AVR projects

5x7 LED dot matrix pong

Pong Pong Pong

DivX video: pong.avi (768x576 25fps) (3.6 MiB)

The classic pong game. Two players. Press the buttons to move paddles up/down. Ball bounces back and forth. If you fail to catch it, your opponent gets one point. Score difference is showed with blue LEDs. Blue LED = lead by one point. If you then win another point, you win the game, and your player number ("1" or "2") is displayed.
Bonus feature - Dual boot: When powering up, you have to press one of the two rightmost buttons. One of them starts pong, and the other one starts ... that's right: The alphabet! You can then scroll through the alphabet by pressing the buttons. Exactly why this game of pong also contains an alphabet, is a mystery whose answer is lost in the mists of time. Or something like that.
Made by Håvard Moen (AVR know-how, programming, some construction), Håkon A. Hjortland (construction, some programming) and Alf Storm (font).

How it works

The LED dot matrix is driven with time multiplexing. The columns are displayed one by one in rapid succession, giving the illusion that they are all lit at the same time.

Source code

parse_font.c [syntax highlighting]
font.h [syntax highlighting]
pong_or_font.c [syntax highlighting]
pong_or_font_2.c [syntax highlighting] [diff] - Update (fixes compile problem)


Tiny Geurrilla Video Game Installation (MiniPong) - Very similar project
http://www.yugo.at/minipong/ - An implementation based on our project
Hat Hack - 21x10 LED pong
Pong Dress - "C-code by Håvard Moen and Håkon A. Hjortland"
Pong resource page by Davis Remmel - Schematics and partslist for this project

Laser video projector

Projector Projector Projector

DivX video: projector.avi (768x576 25fps) (3.5 MiB)
Flicking artifacts are due to camera shutter. It looks good in real life. I promise!

A 16x16 20-30fps monochromatic(red) binary(no greyscales) digital video projector.
Made by Håkon A. Hjortland (programming, construction), Alf Storm (animation), Håvard Moen (AVR know-how, construction help), Ståle Kristoffersen (help with mirrors) and with some help from others.
Original idea (to use laser and rotating mirrors to create a video projector) comes from an article in a science magazine (Illustrert Vitenskap) some time ago (no idea which issue).


How it works

Motor spins drum with 16 mirrors around at about 20-30 rev/second. The mirrors are tilted differently, so that they draw one line each on the screen. Rotation time is measured by the reading fork and divided by 16*32=512. This is the pixel clock. When the reading fork senses that the wire attached to the mirror drum passes, a new frame starts, and the pixel clock starts. For each pixel, the laser is turned on or off. Simple as that! Each line contains 32 pixels, but only 16 are used. The remaining 16 pixels on a line do either represent the gap between mirrors, or, they are used for calibration. Oh, yes. The calibration. I won't be attempting that again any day soon. Each mirror is calibrated in the Y-direction by tediously moving them physically. T-e-d-i-o-u-s-l-y. Did I mention that? The X-direction calibration is done with a lookup-table in software. Ahhh... software... :) And there's your picture. Making video is the easy part. That's just a matter of changing the picture every 4 or 5 frames or so.


Source code

projector.c [syntax highlighting] (Updated 2006-06-25 [diff]) (You might also need the diff from pong [diff] - merge manually)
video_alf.h [syntax highlighting]
test_pattern.h [syntax highlighting]


Building a Laser Projector From Scratch (PDF) - By Alex Hornstein
TinyProjector - Eight lasers + mirror
DIY Laser projector - By Raul
Laser projector - By shakirfm

Questions? Drop me an e-mail at haakoh {a) ifi uio no.