Introduction: Arduino VGA Game Console

Picture of Arduino VGA Game Console

I have done seven Instructables to reproduce some among the most popular old arcade games by means of a bare Arduino and few basic components. The main feature is the generation of a VGA signal, thanks to the VGAx library, published on GitHub by Sandro Maffiodo aka Smaffer.

On the other end any games needed a slightly different configuration, i.e. a different number of buttons and/or potentiometers to drive it.

Finally I decided to build a single game platform, and to correct the codes consequently, for all games, in particular: Pong, Tetris, Breakout, Snake, Bomber and a drawing toy inspired to Etch-a-Sketch.

In this Instructable you can find three codes, (Tetris, Snake and a code for the other four games put together), and the instructions to build a “console” as the one shown in this page.

I decided to split it in two units: one with a potentiometer and four buttons for the single player games, the other with one button and the second potentiometer for the second player (i.e. for Pong).

Thus in total you need 5 buttons, two potentiometers, a VGA connector (DSUB15 female) and, of course, an Arduino! Most importantly, there is no need of supporting IC or special shields!

You can see the complete setup in this video.

The VGAx library allows to use four color with a resolution of 120 x 60 pixels, not many but enough for this retro-game “console”. The graphic is raw but all the games run smoothly. Simple sound effects are included too.

Step 1: How to Build Your Own Arduino VGA Console

Picture of How to Build Your Own Arduino VGA Console

First download MultiGame.ino, Tetris.ino, Snake.ino codes at the bottom of this page and copy it on your PC in a directory with the same name. Then download the Smaffer’s VGAx libraries from this link on GitHub. The easiest way is to copy them in the Arduino software subfolder named "libraries", to be immediately recognized.

IMPORTANT: this library works for Arduno IDE 1.6.4 but it is not fully compatible with elder or newer versions.

Depending on the game you choose to play, uploaded the relative code in your Arduino board (I tested both Uno and Nano). A warning for low available memory is normal. If you do not have other errors everything is ok and you can immediately start to build your own console. For this you need:

  • an Arduino Uno Rev. 3 or Arduino Nano 3.x (ATmega328)
  • a DSUB15 Connector, i.e. a VGA female connector or a VGA cable to be cut.
  • resistors: 2 x 68 Ohm and 2 x 470 Ohm and 5 x 1 to 2 kOhm
  • two 10 kOhm linear potentiometers (similar values are fine too)
  • five buttons
  • some piece of cable
  • one or two nice boxes to put all the components.


  • a breadboard or a strip board
  • a piezo speaker

The schematic is reported at the beginning of this Instructable, together with an overview of the finished “console”.

It shows, as an example, how to connect a button and a potentiometer. More specifically, you need to connect five buttons to pins 5, 10, 11, 12 and 13 respectively. The action performed by each button is described in the upper right table in the schematic (i.e. the four arrows and player one and two start button (P1 and P2). On the left, how to connect a potentiometer is shown (you need two potentiometers to pins A1 and A2).

The speaker must be connected to analog pin A0.

I placed the Arduino board with the VGA connector in a wood box, which holds also the first player potentiometer and four buttons, while the second player potentiometer and his start button are in a separate and smaller box.

If you like this toy and you decide to reproduce it, please vote it for the microcontroller contest! I also appreciate if you write a comment or send a picture in the comment section below.


Rob Cai made it! (author)2017-05-17

Here it is the second version with some intermediate step.

Atrion (author)2017-04-22

How Hard would it be to get this to work with TV out instead of VGA?

Rob Cai (author)Atrion2017-04-25

It is possible but the conversion is not straight
forward, many commands have a slighly different sintax. I already did it for other games. You can find among my other Instructables Tetris in both versions (VGAx and TVout).

Here in #6 you can find Bomber in TVout version.

krummrey (author)2017-04-18

Awesome project! Will more games fit into the ram?
Flappy Bird, a racer, a jump and run, so many more games that would work in that resolution.
A speaker might also be a nice addition. More buttons for the 2nd player... :)

Rob Cai (author)krummrey2017-04-18

Dear krummrey, the real bottle-neck for these games is the Arduino lack of SRAM. The AVR microcontroller has only 2048 bytes available to store and manipulate the variables, and the VGAx library stores the screen variables in a 120x60 pixels framebuffer where each pixel needs 2 bits (4 colors), for a total of 1800 bytes. This means that there are
only 248 bytes left for the sketch variables. Furthermore, in my experience, one should leave at least 100 bytes free to avoid instabilities. Anybody surely can create more games but most likely they cannot join them in a single sketch.

By the way simple sounds effect are already included! Just connect a piezo speaker to pin A0.

ragothaman.ramanujam (author)2017-04-17

Really great !!!, especially for senior citizens hobbists like me. Thank you so much for publishing this.

joaomiguelr (author)2017-04-17


valerioparis (author)2017-04-17

This is very impressive! Congratulations!

About This Instructable




More by Rob Cai:Arduino VGA Console With Five GamesSimple Grafting Without Special ToolsArduino VGA Game Console
Add instructable to: