COLOR SENSOR PROJECT FOR ESCAPE ROOM

July 10, 2024, 18:08

puccioso33

Hi everyone I am a 17 year old Italian boy. I found a summer job for an escape room and they asked me to build a circuit using a color detecting sensor. They just asked me to build something with this device and the idea that came to mind is to create a sequence of colors for the user to guess with cards. So if the sequence to guess is (I will decide it later) red, yellow, green, blue I will give small, plastic and colored cards to put in a sort of hole (similar to where the ATM inserts). If once inserted into the hole the sequence is correct, something with a servo motor will open, otherwise I have to tell the user that he made a mistake and have him repeat everything. The part of the working code that I have already done is taking the values ​​of the colors red, green, blue and yellow (there will be 4 colors to guess for the sequence) and by putting a range to the ifs and a delay (as I will show) I have detected colors. Now the sequence is missing but I don't know where to start and moreover I don't know if what I've done up to now is correct because if I don't have such a high delay the color I detect has similar values ​​to the others and red could be yellow . If you understand, can you help me? thanks


oops.se

Please use paragraphs in the text and don't post pictures of text. Check https://discord.com/channels/818384379197784084/1189386838788542464 for guideance.