VGA Etch-a-Sketch With Arduino Uno




Introduction: VGA Etch-a-Sketch With Arduino Uno

When I was a child I have spent a lot of time playing with "Etch a Sketch", a classical game where you can draw sketches on a plastic board turning two wheels.

Recently I realized that not only it can be reproduced in colors with an Arduino on a VGA monitor, but that I already have all the necessary hardware. All I need are few lines of code!

The hardware is indeed the same of my first Instructables: VGA Pong with Arduino Uno.

The only needed components are two potenziometers, two buttons, few resistors and a DSUB15 (VGA) connector. As usual, no supporting IC or special shields!

You can see it running on this video.

I used Arduino IDE 1.6.4. and the VGAx library done by Sandro Maffiodo aka Smaffer and publish on GitHub here. This library allows to use four color with a resolution of 120 x 60 pixels. One button is to clear the screen, the second to choose the color. One wheel moves the cursor horizontally and the other vertically. Sound is available too.

Step 1: How to Build Your Own "Etch a Sketch" With Arduino

First download "Etch a Sketch" code at the bottom of this page and copy it in a directory with the same name. Then download the VGAx libraries written by Smaffer and published on github. Copy them in the Arduino software subfolder named "libraries".
Once you have the code uploaded an an Arduino Uno (I have Rev. 3) without errors, you can start to build your own console. You need:

  • an Arduino Uno Rev. 3
  • a DSUB15 Connector, i.e. a VGA female connector or a VGA cable to be cut.
  • four resistors: 2 x 68 Ohm and 2 x 470 Ohm
  • two 10 kOhm linear potentiometers (similar values are fine too)
  • two buttons
  • other two resistors (from 1 to 2 kOhm are fine)
  • some piece of cable + breadboard or a strip board
  • facoltative: a piezo speaker

The schematic is reported at the beginning of this Instructable, together with an overview of the finished consolle and and a very artistic example sketch. 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 button, while the second potenziometer and button are in a separate box, since this setup was intended for a two players game.

Of course I suggest to place both potenziometers and buttons in the same box, if you want to reproduce this specific toy.

Please, if you do it, do not be shy, put a picture in the comments below.

As usual, Enjoy!

1 Person Made This Project!


  • Hot Glue Speed Challenge

    Hot Glue Speed Challenge
  • Tinkercad to Fusion 360 Challenge

    Tinkercad to Fusion 360 Challenge
  • Remote Control Contest

    Remote Control Contest



Question 8 days ago on Step 1

Hi I have made this but I would like to change the screen dimensions as I am not using a square display. What line of code would I need to change?

Rob Cai
Rob Cai

Answer 6 days ago

Hi, I think in line 53
x = map(wheelOnePosition, 0, 1024, VGAX_WIDTH - 1, 1);
you should replace such as follow
x = map(wheelOnePosition, 0, 1024, 110, 10);
or, to reduce even more
x = map(wheelOnePosition, 0, 1024, 100, 20);
and so on.
A more "elegant" solution could be
x = map(wheelOnePosition, 0, 1024, VGAX_WIDTH - 1 - Delta, 1 + Delta);
and add at position 36
int Delta = 10;
and try with divverent values for Delta.


Reply 4 days ago

Thank you very much for your reply, I am going to try and see if this works!


5 years ago

Hello I'm going to make something like this and i was wondering If it is possible to use other colors?

Rob Cai
Rob Cai

Reply 5 years ago

Hi josephchrzempiec, sure you can! For a very detailed explanation about the possible color combination, see this link in the VGAx page on GitHub.

You can see the color behaviour in this video I did a couple of years ago.


Reply 5 years ago

Thank you. Do you think with a higher processor then the 8bit uno board can do a lot more graphics like say using the Due board or the M0 pro?

Rob Cai
Rob Cai

Reply 5 years ago

Yes defnitively. For instance the Arduino Due has its own VGA library, see this blog afor instance or the following link