DIY Video Game Using Arduino
by HuyNguyen23 in Circuits > Arduino
103 Views, 0 Favorites, 0 Comments
DIY Video Game Using Arduino
Open source games are simple to learn, share, and play thanks to Arduboy, an 8-bit, credit card-sized gaming platform.
On this device, you can create your own 8-bit games or play ones that others have made. I made my own version of it because it is an Arduino project that is open source.
My objective was to create a PCB that is simple to manufacture with the toner transfer method. I therefore created the tracks and pads as big as I could. You can create a PCB on a breadboard or Perfboard if you don't want to etch the board.
Gather the Components
- Arduino Pro micro (NOT Pro Mini. Pro micro the one with ATmega32u4 chip)
- 7 Pin SPI OLED Display
- 4 Pin Momentary Push Button (12x12x7.3mm)
- Copper clad (If you are making PCB) or you can use Breadboard / Prefboard.
- Slide Switch
- 3v Button cell and holder
- Female Header Pins
- Piezo Electric buzzer plate
Making PCB
The Connections are:
Connect All buttons to GND of arduino.
BUTTON_UP -> Pin A0 of Arduino
BUTTON_DOWN -> Pin A3 of Arduino
BUTTON_LEFT -> Pin A2 of Arduino
BUTTON_RIGHT -> Pin A1 of Arduino
BUTTON_A -> Pin 7 of Arduino
BUTTON_B -> Pin 8 of Arduino
Speaker -> Pin 5 of Arduino
OLED pin GND and CS -> GND pin of arduino
OLED pin VCC -> VCC of arduino
OLED pin SCK -> Digital pin 15 of arduino
OLED pin SDA -> Digital pin 16 of arduino
OLED pin RES -> Digital pin 6 of arduino
OLED pin DC -> Digital pin 4 of arduino
Solder the Components
Downloading the Arduino IDE
To upload games, you must first download and install the Arduino IDE.
The following link will allow you to download the Arduino IDE:
Software at https://www.arduino.cc/en/main
Use the link above to download and install the Arduino IDE on your computer.
Installing Libraries
You must install certain libraries before you can compile and upload a game to your Arduino Boy.
Below is a list of a few of the more significant ones.
https://github.com/Arduboy/Arduboy
https://github.com/MLXXXp/Arduboy2
https://github.com/MLXXXp/ArduboyTones
https://github.com/TEAMarg/ATMlib
https://github.com/Arduboy/ArduboyPlaytune
https://github.com/igvina/ArdBitmap
To download the ZIP file, select the Clone or Download option.
Visit these links, select "Clone" or "Download," then select "Zip." Launch the Arduino IDE and select
Add a.ZIP library under Sketch > Include Library.
and decide which zip file to open. Do this for each and every file.
Alternative technique:
The Arduino IDE Library Manager can also be used to install the libraries in place of downloading and installing.zip files:
Manage Libraries from Sketch > Include Library
then type the name of the library into the search field under Filter.
Uploading Games
Visit this link to see if the hardware is operating correctly:
Arduboy -> ArduBreakout -> File -> Example
then press the upload button. You can use your Arduino Boy to play the breakout game if everything is functioning properly.
Verify that you have chosen the Arduino Leonardo or Arduino/Genuino Micro board.
These websites offer additional games for your Arduino Boy:
https://community.arduboy.com/c/games
http://www.team-arg.org/games.html