I am currently working on making a Simon Memory Game using the Arduino Uno. I have the entire circuit setup but when it comes to the programming, I am completely stumped.
I have 4 outputs and 4 inputs. Each output is an LED, each input is a button. Each button is directly connected to one LED (partners).
What I am trying to program the Arduino to do is when the game is started, an LED turns on for one second. The game then waits for the user to press a button. If the button pressed is partners with the LED that turned on, the game will repeat the first step, but add on another LED and button to be pressed. This process continues until the user gets a button wrong.
So far all I have been able to do is make it so when a button is pressed, the partner LED lights up. I just need a way to incorporate a random sequence that must be followed. Would arrays be my best option, and if so, how do I do it?
Thanks!
BUtton.ino (1.4 KB)