Library for communicating with a Gameduino shield. Provides colour VGA display, hardware sprites with collision detection and stero sound. See http://excamera.com/sphinx/gameduino/ for more details.

Dependents:   GameduinoTest SimpleGameduinoTest RobotRic

Note that to use this library you must also import the CommonTypes library because this library uses it.

To get an mbed talking to a Gameduino shield all you really have to do is connect the Gameduino to the SPI bus. I did it using an LPC11U24 mbed and wired it to the Gameduino as follows:

  • mbed pin...................Gameduino pin
  • 5 (MOSI)...................11 (MOSI)
  • 6 (MISO)...................12 (MISO)
  • 7 (SCK)....................13 (SCK)
  • 8..........................9 (SEL)
  • 40 (VOUT)..................5V and 3.3V
  • 1 (GND)....................GND

mbed pins 5, 6 and 7 make up the SPI datalink. mbed pin 8 should be configured as a digital output and is driven low to communicate with the Gameduino.

Probably best to run the whole lot off a regulated 5V supply rather than relying on the 5V supply from the USB cable. I have had problems with the mbed's 3.3V VOUT supply. If the USB voltage is very low (nearer 4V than 5V) then the mbed's 3.3V regulator won't work properly and can't provide much current. I struggled to draw 10 mA for an LED. These problems go away if you power everything off an external 5V supply. It also means you can unplug the mbed from your computer of course.

Mounting the Gameduino is a bit awkward. I put it on some stripboard using 3 SIL sockets designed for an Arduino. Then I mounted the mbed alongside using two 20 pin SIL sockets. Unfortunately Arduino shields like the Gameduino don't fit nicely on a 0.1 inch grid (like the mbed does) so some connections have to be made using flying wires.

Here are some screenshots:

/media/uploads/RichardE/_scaled_img_0055_compressed.jpg

/media/uploads/RichardE/_scaled_img_0057_compressed.jpg

The code for generating this last display is found here:

Import programGameduinoTest

More complicated test program that generates text, coloured sprites and sound.

Here's the games console:

/media/uploads/RichardE/_scaled_img_0058_compressed.jpg

and the insides. Don't worry about the cables and the 8 pin chips. You don't need them if all you want is a display. They are an RS485 chip and a serial EEPROM.

/media/uploads/RichardE/_scaled_img_0059_compressed.jpg

History

Made the spr variable in the Gameduino class public. default tip

2013-06-05, by RichardE [Wed, 05 Jun 2013 22:03:35 +0000] rev 5

Made the spr variable in the Gameduino class public.


Added putchar method.

2012-11-24, by RichardE [Sat, 24 Nov 2012 12:52:34 +0000] rev 4

Added putchar method.


Added HideAllSprites method.

2012-11-18, by RichardE [Sun, 18 Nov 2012 15:02:56 +0000] rev 3

Added HideAllSprites method.


Moved Types.h out into a separate library called CommonTypes. CommonTypes is now required if the Gameduino library is to compile.

2012-11-15, by RichardE [Thu, 15 Nov 2012 21:23:25 +0000] rev 2

Moved Types.h out into a separate library called CommonTypes. CommonTypes is now required if the Gameduino library is to compile.


Added ClearScreen method.

2012-11-09, by RichardE [Fri, 09 Nov 2012 21:11:37 +0000] rev 1

Added ClearScreen method.


For communication with a Gameduino shield which provides a colour VGA display, sprites with hardware collision detection and stereo sound.

2012-11-07, by RichardE [Wed, 07 Nov 2012 21:48:11 +0000] rev 0

For communication with a Gameduino shield which provides a colour VGA display, sprites with hardware collision detection and stereo sound.