Getting to Simon

Our assignment this week for PComp is to recreate the hand-held game Simon.

To start, I decided to use two breadboards in order to make room for four buttons and four LEDs.  I attached the two together by connecting a wire from board one’s red line to board two’s, and the same with the blue lines.

Next, I set up two buttons to control two separate LEDs.

Here is a video showing how this works.

buttons turn on LEDS from Tami on Vimeo.

Here is the board wired with four buttons, four LEDs and attached to the Arduino, ready to be programmed.

After playing around with the code, I was able to get the four LEDs to light up randomly.

random LEDs light up from Tami on Vimeo.

I am currently trying to figure out how to get the Arduino to memorize the random sequence of LEDs, and then to try to mimic that sequence with button presses to finish the game.

UPDATE
I’m still stuck at getting my output to affect my input to affect my output, to get Simon to work.  My circuits are running smoothly, but my code is not!

For now I’m stuck here.  I’m able to get the sample code posted here to work, but I want to figure out how to write it in my own words.  My code can be found here.