Introduction: Fairly Simple Simon - the Evolution of an Arduino Game

About: Sucks at soldering, [hopefully] compensates with coding.
Important notice: Final (i.e. relevant) version is at the last step of this instructable.
If you want to build a Simon, that is the recommended version.

The rest of the steps show how this evolved from a bare-bones game for LED 13 and Serial (i.e. zero components) until my mail order came through ;)
Each version has a show-off video, of course (making the video is part of the fun for me).

The result is something a noob can build and enjoy playing. If you're just starting, it can be your first project too.

Anyway - this was the first Fairly Simple Simon:


Here's the  "OMG, I've actually soldered something" story:
I've been following some Arduino instructables here, but I was never a hardware kinda guy. Last time I did anything that wasn't software, Bruce Lee was still alive. There's a reason for that: I'm as skillful as Steven Hawking when it comes to building stuff. Especially soldering. On top of all that, I live in Trat, Thailand. We don't have Radio Shack here. We have a Mom and Pop's electronics store where the wife speaks some English (and I speak some Thai). I also show them photos of stuff I need on my cellular. Not what you'd call an Arduino community.

When I was at Barcamp BKK, I bitched to the roboteer @bm_ about not being able to indulge in hardware, and he simply gave me a Freeduino and said "install the software, stick it into the USB, and you're there". He also gave me addresses of internet all-the Arduino-you-can-eat shops, and I'm still waiting for my breadboard (on account of xmas order-jams).

Simplest Simon: a zero-components Arduino game
So what do you do with a naked Arduino? The first ting I did was simplest simon: A binary version of Simon for pin 13 on-board LED and serial connection.
Got  an Arduino lying there and you're too lazy to connect stuff to it? Just upload it. Mighty good value-for-hassle ratio, I think ;)

Still - it didn't let me feel like a maker at the time.If  you play it via serial, then you need a computer. So you might as well play Tetris. I needed to make something really real.

Thus - Fairly Simple Simon was born.

Step 1: Build the Board (breadboard Version)

Note: if you want to build something - build the latest version.
Stuff below is kept for historical reasons.

You'll need:
1 x Arduino
4 x LED (different colors)
4 x normally-connected push-button switches
4 x 150 Ohm resistor (to regulate the LEDs)
4 x 10K Ohm resistor (pull-up resistors for the switches)
Some wire

If you have a breadboard (one day I'll have one too), you can build this quite easily. See the Fritzing diagram below. It is a simple board with 4 leds and 4 normally-closed switches (each led goes via a 150 Ohm resistor, and each switch has a 10K Ohm pull-up resistor connecting between the output and ground).

Step 2: Build the Board (3rd World Version)

Note: if you want to build something - build the latest version.
Stuff below is kept for historical reasons.

If you're fine with the breadboard version in the previous step, you can skip this one. That's the way I did it. Some of it may be useful, other parts can probably serve as negative examples :)

When I went to Mom and Pop, and showed Mom a breadboard on my phone, she's offered me a stripboard. I didn't know there was a difference, so I assumed stripboards were solderless too. That's how I've invented a technique of "stitching" components thru the board in a way that makes it [sorta] touch the conductive strip behind the board. This led to switches that had HIGH/MAYBE states etc. Soldering everything was easy - and simply fixed all the problems.

One good things that came out of this fiasco is that I wrote simon_check_wiring.pde to check whether LED and switch connections are OK. It's also handy if you're not sure which LED or switch wire is which (I know I could label them - but that's for clerks). See comments inside the code.

The "chasis" is made of a piece of styrofoam from some package. It was easy to create the holes for the switches with a cutting knife (a hole with a standard cutting knife's width as diameter is exactly right for this kind of switch). The thing had a tendency to topple over backwards because of the weight of the board, so I used a lighter and a battery to balance the thing.

I guess in western airports you can get arrested for carrying such things :)

Step 3: Play the Game

Upload fairly_simple_simon.pde to the Arduino, and start playing:

After reset, all LEDs flash several times, then they cycle a few times and you start playing a game at level 4.

Playing a game at level N:
  1. Simon picks a random sequence of N LED flashes.
  2. Simon waits for you to press any button when ready.
  3. Simon “says” the sequence. Memorize it.
  4. You should then repeat Simon’s sequence on the buttons.
  • If you’re right, LEDs cycle several times, and you start a level N+1 game at step 1.
  • If you push a wrong button, all buttons flash, and you go back to step 2.
Enjoy.

Step 4: Update: Analog Version

Note: if you want to build something - build the latest version.
Stuff below is kept for historical reasons.


I've decided to play with PWM LED fades, so here's an analog version.
Same, but with smooth fades and fancy win/lose sequences.


The wiring is a bit different (LEDs need to go to PWM pins), so analog_simon.pde also comes with analog_simon_check_wiring.pde (now that wiring is less intuitive - it's even more helpful).

The rest is the same - only softer :)

Step 5: Simon Sings - a Sound-enabled Version of Fairly Simple Simon

At last - got the mail order with breadboard, speaker, etc. This version has sound (makes the game way easier. I was surprised).


To build it you'll need:
1 x Arduino
5 x Pushbutton (4 for the game, 1 [optional] for reset)
4 x 10k Ohm Resistor (pull-up for the pushbuttons)
4 x LED (different colors)
4 x 330 Ohm Resistor (for the LEDs. Not optimal, but works)
1 x Toggle Switch (optional mute switch)
1 x Piezo Speaker
See breadboard diagram below.

The jumper colors are the same in the diagram and the photos, but in the breadboard diagram, the arduino is rotated 180 degrees (relative to the way it sits in the harness), because it makes the diagram tidier.

In real life, led and button jumpers cross each other in a colorful mess. This is why I've decided to put the reset button on the board. There's also a mute switch (my wife loves it).

simon_sings.zip is the game's code.
simon_sings_check_wiring.zip is a utility to help you figure out which LED/button jumper should goe where (there are instructions in a comment inside the code).

If you mod it in an interesting way, please let me know.
Enjoy,
@TheRealDod