Introduction: DIY Video Game Using Arduino (Arduboy Clone)

Picture of DIY Video Game Using Arduino (Arduboy Clone)

There is an 8 bit, credit card sized gaming platform called Arduboy, that makes open source games easy to learn, share and play.

You can enjoy 8-bit games made by others on this device, or you can make your own games. Since it is an open source project and uses arduino, I decided to make my own version of it.

My goal was to design a PCB which is easy to make using toner transfer method. So I made the tracks and pads as large as possible. If you don't want to etch the PCB, you can make one on a breadboard or a Perfboard.

Step 1: Gather the Components

You will need:

  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

WARNING: You have to make sure that you have a ATmega32u4 based pro micro and 7 pin old display, otherwise the project won't work.

After completing this project i realised that, the 3v button cell can only power the game for less than a minute. Since I'm using a USB cable to power mine, i didst bother to recreate the PCB files. So consider using much more powerful battery if you want complete mobility.

Step 2: Making PCB

Picture of Making PCB

You can etch a custom PCB using toner transfer method, or you can solder components to a pref board using the schematics.

Download the PCB files from here and etch it.

Link : https://github.com/B45i/Arduboy-clone

I've tried to make this PCB as DIY friendly as possible. It has big traces and wide pads. That will make the etching process and soldering easier. If you have no experience with PCB etching before, follow these tutorials.

https://www.instructables.com/id/Making-A-Customiz...

Step 3: Solder the Components

Picture of Solder the Components

Solder the 6 Push buttons, slide switch and battery holder to PCB.

(If you are going to power the game using USB cable then you don't need the battery.)

We are not directly soldering the arduino and oled display to the PCB, as we can use them for some other project in future. Solder the female header pins to the PCB first and attach the oled display and arduino to headers. This will increase the thickness of our arduboy but we can remove these parts if we want.

There is a jumper wire going to the speaker. It is denoted in red color in the PCB files. Use a piece of wire to make this connection.

To connect the piezo electric buzzer, solder two wires to the buzzer plate and solder that wire to PCB. Attach the buzzer plate to PCB using a double sided tape.

Attach arduino and OLED display to corresponding header pins.

If you are making this project on a breadboard, then all you need to do is just connect the components as specified in the schematics. Here I made a separate joystick using 6 buttons and attached them to the breadboard.

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

Step 4: Downloading the Arduino IDE

You have to download and install arduino IDE in order to upload games.

You can download the arduino IDE from the link below :

https://www.arduino.cc/en/main/software

Download and install arduino IDE for your computer from the above link.

Step 5: Installing Libraries

Picture of Installing Libraries

To compile and upload game to your arduboy you have to install some libraries.

I will list some of the important ones below.

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

Click on Clone or Download button and click Download ZIP

Go to these links and and click on clone or download and download zip. Open arduino IDE and click on

Sketch > Include Library > add .ZIP library

and select the downloaded zip file. Repeat this for all the files.

Alternate method:

Instead of downloading and installing .zip files, you can also install the libraries using the Arduino IDE Library Manager:

Sketch > Include Library > Manage Libraries

then enter library name in the Filter your search field.

Step 6: Uploading Games

Picture of Uploading Games

To check whether the hardware is working properly, go to :

File -> Example -> Arduboy -> ArduBreakout

and click upload. If everything is working correctly you can play breakout game on your arduboy.

Make sure that you have selected the board as either arduino Leonardo or Arduino/Genuino Micro

You can find more games for your arduboy from these sites:

https://community.arduboy.com/c/games

http://www.team-arg.org/games.html

Sometimes you may run into an error like :

fatal error: ArduboyPlaytune0.h: No such file or directory

#include

^

compilation terminated.

exit status 1 Error compiling for board Arduino/Genuino Micro.

while uploading games.

To fix this error, search the missing library name on http://github.com/.

Download and install the library as we have done before.

Here is the video : https://youtu.be/F9ElDo-wLUA

Step 7: Enjoy !!

NOTE:

I've connected the second speaker pin to ground, instead of Arduino pin 13 as the real Arduboy does. Therefore, the sound for some games won't work properly.
I haven't included the RGB LED that a real Arduboy has. Therefore, games which make use of the RGB LED will be missing the LED effects and might be more difficult to play.

Huge thanks to MLXXXp from arduboy community for pointing out the mistakes.

This is my first indestructible, So its not perfect. If you need any help with this project please let me know in the comments.

Comments

LukášB59 made it! (author)2017-08-11

Hi, I made it, but it was working only about 1minute. Than buttons stop working and go always to left (or right), can be some trouble with grounding here? Or I just overheated the buttons? I think that sometime it push button when you touch the prototype board anywhere outside of circuit... can anybody help please?

B45i (author)LukášB592017-08-11

If it moves without you pressing the buttons, then there is some problem with the grounds. and i think you were supposed to solder the buttons from the other side of the board.

LukášB59 made it! (author)B45i2017-08-13

It looks clear from the other side. I made buttons again only on breadbord this time and it work fine... Anyway thank you for great instruction how to build it. One think to improve -> my oled display from ebay has pins gnd, vcc, D0, D1, res, dc, cs. So it's confusing that there is no sck and sda pins, please write a note about it in pinout... (http://www.ebay.com/itm/White-3-5V-OLED-0-96-SPI-Serial-128X64-LCD-LED-Display-Module-for-Arduino-/172309611366?hash=item281e740366:g:c0kAAOSwMtxXtG1M)

Daniyal Shamsi 154 (author)2017-07-03

Hey..!!..Can't we any arduino other than Pro Micro..???

B45i (author)Daniyal Shamsi 1542017-07-04

Any ATmega32u4 based board should work.

Maker_Inc (author)2017-07-02

nice build but you could have made it more similar looking to arduboy that would be more convenient . but anyway nice build .I will try to make it sleeker .

B45i (author)Maker_Inc2017-07-02

My first build was sleeker. I used small push buttons and had a choclate bar design. Since the buttons were too small, my hands started to hurt after using it.So i decided to make it with larger button.I kinda like this psp style form factor so i changed the design to this.
And i wanted to have larger pads and trace width.
If you want you can use my desgin files as a refernce. You can find my designs from here : https://easyeda.com/B45i/Arduboy_clone-da02c53b733545e0a771ebc4e5b6e590

Maker_Inc (author)2017-07-02

why did you use piezo?

B45i (author)Maker_Inc2017-07-02

Original arduboy uses a piezo. Si i decided to keep it that way.

Boxoffrogs (author)2017-07-02

Brilliant, thanks!

DIY Hacks and How Tos (author)2017-07-02

Cool. Games are always a great way to teach people how to make stuff. It makes the learning process a lot more fun.

About This Instructable

2,029views

40favorites

License:

Bio: Computer Science student from Kerala. Programmer. Maker.
More by B45i:DIY Video Game Using Arduino (Arduboy Clone)
Add instructable to: