DIY Video Game Using Arduino

by HuyNguyen23 in Circuits > Arduino

29 Views, 0 Favorites, 0 Comments

DIY Video Game Using Arduino

448337854_450331277706236_86251634825504551_n.jpg

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

  1. Arduino Pro micro (NOT Pro Mini. Pro micro the one with ATmega32u4 chip)
  2. 7 Pin SPI OLED Display
  3. 4 Pin Momentary Push Button (12x12x7.3mm)
  4. Copper clad (If you are making PCB) or you can use Breadboard / Prefboard.
  5. Slide Switch
  6. 3v Button cell and holder
  7. Female Header Pins
  8. Piezo Electric buzzer plate

Making PCB

Screenshot 2024-06-18 082932.jpg
Screenshot 2024-06-18 083759.jpg
Screenshot 2024-06-18 083743.jpg

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

448337854_450331277706236_86251634825504551_n.jpg
448570092_356490150487047_5910791576396295834_n.jpg

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



Enjoy !!