Introduction: Arduino Based Handheld Game Console (now With Open Source Modular Engine)
I made this handheld a year ago. Now I want to share this project if someone else would like to build it.
Update:
I started coding a new, much more modular engine based on the handheld project. I moved to Visual Studio 2017 and it's just so much better. You can find the code here:
Step 1: Hardware
First step is to build the hardware. This design is really simple. All you need is an Arduino, screen and 9 buttons. Here's the list of all parts:
- prototyping PCB (with dotted copper)
- Arduino Nano
- SSD1306 OLED-screen with SPI-interface
- 9 pcs of 6x6x6 mm buttons
- Female headers if you want to reuse the Arduino and OLED
- Wires to connect the pins
- Soldering stuff for soldering (obviously)
- Rechargeable battery (If you want, it isn't necessary. I recommend using JST XH 2.5-2 pin connector for the battery. Also you might want to use the TP4056 charging and protection circuit.
How to connect the pins:
Connect the buttons like this:
- Up = A4
- Left = D3
- Down = D5
- Right = D4
- X = A2
- Y = A3
- B = A0
- A = A1
- Q = D2
Connect the OLED like this
- GND -> GND
- VCC -> 3,3 V
- D0 -> D13 (clock)
- D1 -> D11 (data)
- RES -> D8
- DC -> D6
- CS -> D7
Step 2: Software
I coded some pretty crappy games for the console. If you want, you can check the old code from my GitHub: https://github.com/Teneppa/handheld_open_source
The new engine project can be found here: https://github.com/Teneppa/openTileEngine
Mushroom_mcp_continued_v10_converted is the one with these six games. There's also a tilengine_demo; I tried to make the tile-engine modular but it got a bit over my knowledge. I managed to make the drawing algorithms work, but I'm pretty sure I can't finish it by myself. I'll just share it to all of you if you want to try your skills with it.