Berry Racer is a game that I came up with and programmed using Arduino’s Software. The game is run on a Teensy microcontroller which is connected through a custom PCB (Printed Circuit Board) to a Screen, a Joystick, four buttons, and a piezo speaker. The board can be powered through the micro USB port on the Teensy or with a battery that can be plugged into the back of the PCB, there is also a switch to turn the circuit off when running on battery power. This Device and Program was designed and built by me with the help of Zane Cochran who was the instructor of the CRT 420 – Special Topics Course at Berry College for the Creative Technologies major.
This instructable will go into detail about how to build a GamePad like this one, however, I hope it is also helpful in case you want to build something slightly different. The video that is linked to this intro slide covers the entire build process as well as some of the programming steps that I took, however it does not go into a lot of details about programming. I try to explain why or how I am doing the things that I am doing and in the end, I criticize my shortcomings on this project, I definitely am proud of what I was able to accomplish with this project but there are so many more things that I want to improve in the future. Let me know if you would like to see a version 2 and what improvements you would make! But for this instructable, I will detail the steps I took to accomplish this version 1 GamePad.
The following is a brief overview of the design process and provides all necessary links to the components/equipment/software that is required and will act sort of like your Bill of Materials. Read through the entire thing and figure out what components and/or software you might need.
To begin, I figured out what Game I would make and what I wanted my GamePad to look like. You will need to use Inkscape to create a DXF file for the outline of the board. I then used easyEDA to design the board based on that outline and once I was happy with the board, I ordered the boards to be manufactured. Below is the list of components that I used on the board.
10k resistors (4) (if you have a starter kit you most likely have some 10k’s leftover)
Teensy 3.2 (1)
Slide switch (1)
Header Pins (1)
Piezo Buzzer (1)
The board will take about 1-2 weeks to be manufactured and shipped to your doorstep. Once you receive your boards, the next step is to gather your components and then solder them into the board. I had access to really nice soldering stations at the lab but any plain soldering iron will get the job done. The minimum order is 5 boards so you will have a couple of extras in case you screw something up with the soldering process. That being said, if you do screw up, try not to screw up with the Teensy or the screen as those are the most expensive components. Helping hands are nice to have when soldering but not required, using rubber bands can also a cheap and easy alternative to holding components into the board while you are soldering, you can actually see me doing this in the video along with helping hands. You’ll also want to have some wire cutters and Kapton tape.
Once you have correctly soldered everything into the board, you can begin testing your components by uploading the code that I will provide. This will be the code I used for my class and I will provide explanations of the most important bits to hopefully help your understanding of the code. Part of this code will show you on the screen when you interact with the joystick or the buttons letting you know that everything is working. In order to do any of this, you will need Arduino’s software (I recommend downloading the program instead of using the web version as I have not used the web version) as well as the driver for the Teensy (Follow instructions on PJRC page).
Once you have tested that your board and components work, you can go ahead and start programming your game! This instructable will show you how to program my game and hopefully also be helpful for programming a game of your own.
If you want to and have access to a 3D printer, you can also make a case for your GamePad. To model the case I used Fusion 360 but there are other options that you can use. I use Fusion because you can get it and the entire AutoCAD suite for free with a student email account.
If you find any mistakes in this Instructable, please let me know so that I can correct them right away! I am trying to be as detailed as possible but I am human and it is possible that I missed a step or am just straight-up wrong on something since it has been a while since I did this stuff.
I am also not claiming that this is the perfect way to go about making something like this, there are probably more efficient ways but this instructable will detail the steps that I took to make this GamePad and program BerryRacer.