I am creating a portable escape room and I need help on one of the puzzles I am creating. The concept is that players will need to cut the yellow wire first which will speed up the timer 2x as fast and then they need to cut the green wire to defuse the bomb. If they cut the red or blue wire it will play an explosion noise and cause the bomb to "blow up." I have the code done and there are no issues with it when I upload it but when I try to use it with my wiring nothing happens. I also have it so that when a microswitch is released the timer will start because the players will only have 5 minutes once they discover the bomb. I know nothing is wrong with my Arduino because I have tried a different code and it works. Something must be wrong with my code or my wiring. If you could help that would be great. Thanks!
and again later on:
int red = analogRead(sensorPinRed);
int yellow = analogRead(sensorPinYellow);
int green = analogRead(sensorPinGreen);
int blue = analogRead(sensorPinBlue);
Serial.print("CONGRADUATIONS! BOMB DIFFUSED!");
Congraduations? Not a real word: Congratulations.
I have made the changes that you have suggested and it still does not work. I have opened up the serial monitor and it does not change anything when a wire is cut.
Your wiring diagram shows pins 8, 9, 10, and 11 being used (red, yellow, green, and blue). Why does your sketch use 6, 7, 8, and 9 (red, yellow, green, and blue)?!?