AcceLED Pong - Accelerometer Controlled Pong
AcceLED Pong is a simple project I whipped up while playing with a 2-axis accelerometer from Analog Devices. The ADXL203 is hooked up to an Atmel ATMEGA32 chip that processes the data and controls a red/green LED matrix from Sparkfun.
The game is controlled by tilting the board left and right to move the paddle. The computer is a bit braindead--I didn't want the AI so good that I couldn't beat it.
The code is written for the ATMEGA32 and meant to be compiled and installed with the avr-gcc/avrdude toolchain. I had it working on an Arduino for a bit, but hosed my code accidentally. It would be really easy to port to an Arduino if anybody wants to do that.
Incidentally, the hardware is general enough to run another project I whipped up in a few hours, an LED spectrum analyzer.
Hardware
Atmel ATMEGA32 AVR Microcontroller
Analog Devices ADXL203 2-Axis Accelerometer
Push Button for Reset
8x8 RG LED Matrix from Sparkfun
Software
You can download code here: acceled_pong.tar.gz.
Schematic
Schematic: acceled.pdf.
AcceLED Pong is a simple project I whipped up while playing with a 2-axis accelerometer from Analog Devices. The ADXL203 is hooked up to an Atmel ATMEGA32 chip that processes the data and controls a red/green LED matrix from Sparkfun.
The game is controlled by tilting the board left and right to move the paddle. The computer is a bit braindead--I didn't want the AI so good that I couldn't beat it.
The code is written for the ATMEGA32 and meant to be compiled and installed with the avr-gcc/avrdude toolchain. I had it working on an Arduino for a bit, but hosed my code accidentally. It would be really easy to port to an Arduino if anybody wants to do that.
Incidentally, the hardware is general enough to run another project I whipped up in a few hours, an LED spectrum analyzer.
Hardware
Atmel ATMEGA32 AVR Microcontroller
Analog Devices ADXL203 2-Axis Accelerometer
Push Button for Reset
8x8 RG LED Matrix from Sparkfun
Software
You can download code here: acceled_pong.tar.gz.
Schematic
Schematic: acceled.pdf.