Displaying images on 8×8 RGB LED displays

Just a short proof of principle thing, badly coded and terribly slow, but it works :-)

Images must be converted to the RAW PPM format using e.g. GIMP. If you think of using ImageMagick and convert: doesn’t work properly !

Here is an example of a small image in this format.

Short description of the lines starting from 1:

  • ASCII: Identifier
  • ASCII: Comment
  • ASCII: x-resolution space y-resolution
  • ASCII: max color value
  • HEX: sequential data: R,G,B,R,G,B …

If you look at such a RAW PPM image with a hex editor it might look like this:

( space = 0x20 (hex), n = 0x0A (hex) )

Tux This is an image of … TUX (of course) !

Such an image is easy to read and process in Perl:

The pack() and unpack() functions are used to determine how Perl interprets the raw data. It’s too difficult a thing to explain here, so just a link.

Here’s the code/example: show_ppm.tgz

I updated the code a bit and improved transfer speed quite a lot:

  • upped serial speed to 57600
  • transmit one row in one go, reduce start/stop byte overhead
  • tweaked delay times in Perl

Here’s the improved code: show_ppm_v2.tgz

And another update. Here’s an animation stored in PROGMEM.

Here’s the code: show_ppm_v3.tgz

This entry was posted in Arduino., Electronics. and tagged , , , , , , . Bookmark the permalink.