This is a fun project I did with my kids over the holidays.
To house this game I decided to use an old iPhone 5c box. I had it just lying around and it seemed about the right size.
List of Components:
(Note: all links are products I used at the time I built the game and may become out of date over time)
- Adafruit Pro Trinket 3V
- Adafruit Pro Trinket LiIon/LiPoly Backpack Add-on
- Polymer Lithium Ion Battery - 400mAh
- Half sized breadboard (or Half sized Perma-Proto breadboard)
- iPhone 5 box
- Heat Shrink Tubing
- 2 Position Terminal Block2 Position Terminal Block
- Thin Plastic Speaker
- 16mm Illuminated Latching Push Button (White)
- 16mm Illuminated Momentary Push Buttons (Red, Yellow, Blue, Green)
Step 1: Constructing the Box
- 5/8" drill bit
- 1/16" drill bit
First clean out the packing material from the iPhone box. Using the 5/8" drill bit, drill the holes for the on/off button on the side of the box, and the 4 game buttons on the top of the box. See the image for measurements and placing of the buttons.
Next using the 1/16" drill bit drill the holes so the sound from the small plastic speaker can escape from the box. I drilled 9 holes in a 3x3 matrix, on the same side opposite the on/off button.
The buttons insert nice and snug, and you can use the plastic nut that they come with to secure them in place.
Step 2: Wiring
The sketch shows the wiring of my prototype. I could only find red LEDs in the Fritzing parts library, but my prototype actually used Red, Blue, Green and Yellow LEDs.
You'll notice that in my project I used buttons with LED's built in so the led's and buttons are wired to the same component, and I did not actually need the resistors when using the LED buttons. The pins in the center of the button that have the +/- signs are for the LED, and the pins on the side are for the button and can be connected in either direction as its non-polarized.
After attaching the wires to the buttons I used heat shrink tubing to prevent the wires from shorting out on each other.
To assemble the Pro Trinket you'll need to solder on the header pins. Installing the battery backpack is a little trickier. See the tutorial on the Adafruit website.
Step 3: Coding the Micro-Controller
I used code from another project I found on Indestructibles called Improved 'Simon Says' Code. The code worked great when testing my prototype, the only things I changed are the pin assignments.
Programming the Pro Trinket is very similar to the Arduino. First you'll need to follow the instructions on the Adafruit website for Configuring the Arduino IDE. For Some reason I wasn't able to program the Pro Trinket using USB, I ended up using the FTDI cable instead.