It's been a couple of weeks since I've been able to play hands-on with electronics because I've been busy with client work and out-of-town traveling.
To continue satisfying my must-be-tinkering-with-something urges, I hit upon the idea of using some old Windows code I had lying around to allow me to program LED matrices, without the LED matrices or an Arduino. This means I can effectively be developing code for the Arduino while on the road (we travel around 50% of the year seeing our clients around the world). The old code was for a life simulator (creatures running around fighting, breeding, etc) but it had all the code to display a bitmap on screen and update it already worked out. I figured that I could use it to simulate an 8x8 LED matrix - so off I went.
What it turned into is a couple of classes that simulate a maze and an 8x8, 16x16, or 32x32 LED display. I thought the code would be useful to a bunch of you so I've zipped it up for you to download and play with. The cool thing is that I can work on the maze processing code while on the road and then come home and drop it into the Arduino environment to compile and use. As long as I have LED matrix driving code on the Arduino, it should work like a charm.
Here's a screenshot of the simulator running:
Black 'dots' are on LEDs, spaces are off LEDs, the lighter colored dot is supposed to be a different color LED to represent a person. The simulator can switch between 8x8, 16x16, and 32x32 displays by pressing the Page Up and Page Down keys. Movement is through the arrow keys. The display mode can either be static with screen changes when the person crosses a window border (i.e. the person moves around on the screen) or scrolling, where the person stays still and the maze moves around. Pressing S switches between the two modes.
The code is in a zip file: Maze021710.zip (12.1k) and I've been using VS 2005 Professional to develop and debug.
There are plenty of comments in the code and I'm happy to answer questions about it.