Im trying to make an Aduino Geoache. I'm a beginner with arduino so Simon Says codes are quite difficult.
I found a code online which uses a servo motor to unlock the geocache. Instead of the servomotor I'd like to use a electromagnetic lock (5V) which should stay open for 10 seconds if someone wins the game.
I've tried to alter the code but it doesnt work.
This is the original code which I can't alter. I took the code from here
Does anyone know how to change the servo into a lock that should stay HIGH for 10 seconds if someone wins the game?
That statement is wrong. The code does work. It might not meet your expectations, but that only means that your expectations are wrong.
If you need help aligning your expectations with reality, you'll need to describe exactly what the program does, and how that differs from what you expect.
Does anyone know how to change the servo into a lock that should stay HIGH for 10 seconds if someone wins the game?
That should be trivial. There is a play_winner() function that moves the servo. Just replace that code with code to make a pin HIGH, or LOW, as required to make the lock operate. Wait 10 seconds, instead of 1/2 a second, then set the pin back the other way to re-lock.