Axon microserver
InterplayMedium Hardware |
LED tetris game (based on MAX72XX LED driver) cookbook This instruction is applied to Arduino Diecimila, but most probably it will work on Deumelianove as well. You may need to change connection on other AVR devices. In the source code you can find the original AVR microcontroller pinout reference. 1. Download required files:
Tetris was written on C. To compile and flash it, you need to install the following packages: sudo apt-get install avrdude sudo apt-get install avr-libc sudo apt-get install gcc-avr Additionally to these packages, I recommend you to install original Arduino framework. It contains original avrdude config. Would be easier to use it in the flash script (see bellow). 2. Fabricate PCB, solder LEDs and wire it correctly to Arduino
Attention! Additionally to this you need to pull-up reset pin to prevent resetting during serial incoming communication (this is Arduino specifics). So, include (aprox.) 120 Ohm resistor between reset and power pins. 3. Compile it and flash the Arduino try
Please check DEFINES, CONF and DUDE variables in "make" and "flash168" scripts. CONF and DUDE should point to the correct avrdude.conf and avrdude binary, respectively. Also don't forget to change serial device name, if necessary. Then compile it, connect you Arduino board and flash the binary. ./make ./flash Please note, that you need to reset Arduino just in time to flash Arduino with avrdude. Arduino runs bootloader on start and waits quite for a short period of time for firmware to upload. So just press reset button right before running "flash" script! In case of success, you could see nice shifted diagonal stripes runs on LED matrix. Test the game test it by running
Use arrows keys to play. Additional stuff Additionally to that, you can find some extra graphic files for a nice InterplayMedium LED matrix wrapper and stickers in the same place. By the way, you can create several matrices, cascade it and expand gameplay area. To run several matrices simultaneously, just change the number of matrices (#define INUSE) in the source code, recompile it and reflash the microcontroller. |