Introduction: How to Play Flappy Bird on Your Touch Board
Remember when Flappy Bird took the smartphone gaming world by storm but was then pulled from stores? Well, Flappy Bird is back and this time you can control the bird using the Touch Board!
All you need is the Touch Board , Adafruit’s NeoPixel shield , a bit of Electric Paint and a few your engineering skills, to get this game up and running in a couple of minutes. You can even add some sound effects to your game!
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Materials
To begin you will need:
1x Touch Board
1x Adafruit NeoPixel shield
1x set of male and female headers
Step 2: Setting Up the Touch Board
Before starting this tutorial, make sure you have set up your Touch Board. If you haven’t done so, please have a look at this tutorial here . If you have, you’re ready to go to Step 2!
Step 3: Soldering the Headers Onto the Touch Board and NeoPixel Shield
First, you need to use your soldering iron and solder the headers onto the Touch Board and NeoPixel shield. There are 4 headers in total for each component: 2 x 8 pin headers, 1 x 10 pin header and 1 x 6 pin header. On the image on the right, you can see where which header goes where.
After you have successfully soldered the headers on, plug the NeoPixel shield into the Touch Board as shown on the bottom image on the right.
Step 4: Uploading Code
Plug the Touch Board into your computer via the USB cable and turn the Touch Board on.
Open the Arduino IDE and open the sketch via File→Sketchbook→Touch Board Examples→flappy_bird. You then need to install the NeoPixel library. Go to Sketch→Include Library→Manage Libraries and look for “Adafruit NeoPixel”. Simply select it and click install.
Next, set the IDE to upload the code onto the Touch Board by selecting the following settings:
“Bare Conductive Touch Board” under Tools→Board
“Bare Conductive Touch Board” under Tools→Port
Finally, hit Upload!
Step 5: Give It a Go!
You can now try the game. The controls are as following:
E0 – Start or reset the game
E11 – Move the bird
E2 – Increase volume
E3 – Decrease volume
E5 – Increase brightness
E6 – Decrease brightness
This game is based on the popular mobile phone game Flappy Bird. You start the game by touching electrode 0. The aim is to get the bird, the yellow LED, through the gaps of the pipes, the green LEDs. You move the bird by approaching electrode 11; this game is based on proximity sensing. The speed of the pipes coming towards the bird will increase after the first couple of successes. Once you hit the pipes the game is over and your score is displayed. If you want to play again, just touch electrode 0 again.
It’s a bit tricky to move the bird just by approaching electrode 11, which is why it’s time to make a sensor!
Step 6: Paint Your Sensor
You can use all sorts of sensors for this game! Here is a visual guide that shows you what objects you could use to control the game.
You could also design your controller with Electric Paint. When it comes to designing proximity sensor with Electric Paint there are some guidelines you should follow. We have a tutorial for proximity sensors here . To help you in making a controller we have designed one for you, which you can download here . Our game controller gives you easy access to the restart button. Alternatively, you can just design your own sensor!
If you want to use our design, simply print out the downloaded file and follow the black lines with Electric Paint. Leave it to dry for about 15 minutes. Then move onto the next step!
Step 7: Attach Sensor
Once the paint has dried, you can connect your Touch Board to your sensor. We recommend two methods, either crocodile clips or cold soldering.
When using crocodile clips, you first need to cut the paper so that the electrodes of the controller are on the edge of the cut-out. Then, with the Touch Board turned off, simply attach one end to the sensor and the other end to the Touch Board. Note that the cable of the crocodile clip connected to electrode 11 also acts as a sensor, so if you approach the cable, you are going to move the bird. Furthermore, the crocodile clips can interfere with each other when the cables overlap, so make sure that the cables are not touching.
Alternatively, you can cold solder the board to the sensor. If you haven’t cold soldered before, have a look at the tutorial here .
Step 8: Play the Game!
Now it’s time to play. Turn the Touch Board back on and hover your hand up and down over the sensor. You should be able to easily move the bird up and down.
You might find that the Touch Board is either too sensitive or not sensitive enough to move it. In this case, you can play around with the variable “filterWeight” in the code. Change the numbers until it works better for you. If you want to add sounds to the game have a look at the Hole in the Wall tutorial here , from step 10 onwards.
If you have any questions, you can contact us at firstname.lastname@example.org .