I made a memory game with self-made touch pads and a neopixel ring for a schoolproject. This game is similar to Simon Says except that many forms of input and feedback (sounds and light effects) in the game are different. I programmed sounds from Super Mario, The Legend Of Zelda and Sonic The Hedgehog with the pitches library. As a finishing touch I added a high score and speed changer in the game menu. The player will get to the game menu when a game is finished or the device is turned on. This Arduino device is made to be portable.
Parts you need to make this:
- Arduino Uno R3
- Screws or nails
- NeoPixel Ring (16 RGB LED' s)
- PCB board
- 8 ohm, 0,25 Watt speaker
- 1 resistor between 300 and 500 Ohms
- 4 resistors of 100 Ohms
- Battery holder (6 AA) or 9V battery holder
- ON/OFF slide switch
- Thin colored plastic foil (I used colored tabs)
- Paint (additional)
- Milk glass or white plastic (with very little transparency) cap or
Tools you need:
- Wood saw
- Soldering iron
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Connections
These are the connections I made on the breadboard with prototyping before I made the system. You can use it for help.
Step 2: Battery Holder and Switch
I first made the sides of the box and glued the battery holder to a corner. I glued the PCB board with the attached Arduino next to the battery holder. On an empty part of the PCB board, I glued the speaker and raised NeoPixel ring. I have taped some wires to the battery holder so they would not get loose. I drilled some holes for the speaker so the audio gets a bit louder and also made an opening on the side where I glued the on/off switch.
Step 3: Sound
I added a speaker for sound. The speaker was very simple to solder, because I soldered a wire to digital output 12 and a wire from the speaker to ground. I have programmed many sounds with the Arduino pitches library. I found it funny to use sounds from Mario, Zelda and Sonic. But I had a reason to use these sounds. I found that the coin sound worked perfectly to communicate to players how many points they scored because it is a quick sound. The chest opening sound from Zelda felt as a perfect victory sound. I also used two Sonic sounds. The first one is when a player fails, then he/she will hear the game over sound from Sonic which is in my opinion a perfect fail sound. I also used a Sonic sound in de game menu. When the player touches the blue pad, the Green Hill Sonic melody will be played. The pace of this melody shows what the pace setting of the game will be. There are 4 settings for the speed. The red pad gives the secret sound from Zelda because it does not do anything and I thought it would be a cool Easter egg.
Step 4: Touch Pads
I added pressure pads to the game that are intended to behave like touch pads, and I made and designed them myself. For the sake of this instructable I will keep calling these pressure pads touch pads.
The shapes of the touch pads are more unusual than the type of pressure sensors there are on the market. First off I wanted to make very edgy and rectangular shaped touch pads, but later on I had chosen to implement a more organic shape for the pads. Because the pads have an unusual L/blob shape, people find it more interesting to interact with and look at (I asked family members to play with the toy and give me their feedback). How I made the touch pads is based on this instructable: https://www.instructables.com/id/Flexible-Fabric-.... The difference between this pressure sensor and mine is that I used copper tape as conductive material. I also did not use any kind of fabric except the Velostat. I made some slots on top of the box, so I could slide the two copper parts on each pad through them to solder them inside to with a wire the the pcb. To finish the pads, I cut 4 coloured shapes of plastic and glued them on top (glued carefully at the sides of the pads). The wires are connected with the PCB board with solder to analog inputs. Each input also has a connection to ground with a resistor of 100 Ohms in between.
Step 5: RGB Ring and Soldering
I chose a NeoPixel ring with 16 LED's as light source. I chose this instead of normal LED's because it gave me very much freedom in programming different effects for the game. I also liked the bright colours of it and how some materials could manage to make the light faded and diffused and not dotted and harsh. I placed the RGB ring in the middle because I thought that that would be the perfect spot for a memory game. This way I was able to give each color a quarter and direction on the ring that would be intuitive. I have glued a piece of wood inside to raise the RGB ring to its desired height and sawed a circular hole in the middle. In that hole I place a big white plastic cap and it gave a very nice faded effect but not too faded that the direction from where the coloured light comes from is too faded. I have soldered a 320 Ohm resistor between the Arduino digital output 5 and NeoPixel input. Then I have also soldered a wire between 5v on Arduino and NoePixel ring and Ground from Arduino goes to ground on the NeoPixel.
Step 6: The Code
My code is based on another example of Simon Says but I had to change and add different code for it to work with the NeoPixel ring and touch pads. I also programmed some different sounds. A high score is what I added too and I have also added a speed change button. The code is based of off and old Simon tutorial for Arduino and I placed that in the notes on the top part of the main script.