I have done different Arduino games working on VGA monitors, but I haven't done yet an Instructables of my first one. Now, here it is: the name is "Arduino Bomber" and, as usual, it works by means of a bare Arduino Uno and few other components. As in my previous Instructables, the goal is to avoid any special shield or supporting IC. The only needed components are one button, a potenziometer, few resistors and a DSUB15 connector.
You can see it running on this video.
I used Arduino IDE 1.6.4. and the VGAx library done by Smaffer and publish on GitHub here. This library allows to use four color with a resolution of 120 x 60 pixels, not many but enough for this retro-game.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Schematic and Code
To reproduce "Bomber", you need first to download the code (see at the bottom of this page). The file "VGAX_Bomber.ino" must be copyed in a folder with the same name.
Then you need the VGA libraries. You can immediatly upload them on an Arduino Uno libraries folder.
If you do not have any error message (except a warning for low memory which is normal), the program is supposed to work, thus you can begin with the hardware, i.e. with the connections shown un the schematic.
You need the following components:
1) an Arduino Uno Rev 3 - original or a clone, but original is better :-)
2) a DSUB15 connector (i.e. a standard 15 pin VGA one)
3) resistors: 2 x 68 Ohm; 2 x 470 Ohm and one of about 1 to 2 kOhm
4) a button
5) a linear potenziometer (10 kOhm is ok, for instance)
6) facultative - a speaker (not shown in the drawing). It has to be connected to pin A0.
You can use either a breadbord or a pc board (I did the latter, as shown in the example picture). Here you can see the game with green, yellow and red (over a black background), but you may also choose different color combinations, as described in the VGAx library link.
If you have done everything properly, you should be ready to play!