Lessons and the learning game

Build a light painting stick

A strip of LEDs that paints pictures in the air for a long-exposure photo: images as columns, bitmaps from a card, and your name in light.

What you build

A light painting stick. Walk it past a camera with the shutter held open, and as it plays a picture one column at a time, the photo shows the whole picture hanging in the dark.

How it works

One column of pixels. The stick is a single column 16 pixels tall, and a column is a 16-bit number: bit 0 is the bottom LED.

Pictures stored sideways. A picture is a list of columns, left to right, the order they are played. Text is built from a 5x7 font, each pixel doubled to fill the stick.

Real BMP files. A 24-bit BMP has a 54-byte header, then the pixels: rows stored bottom row first, three bytes a pixel in blue, green, red order, and every row padded with zeros to a multiple of four bytes. A 10-pixel row is 30 bytes plus 2 of padding.

Timing for a walk. On the photo a column is as wide as the distance walked while it shows: at 1.4 m/s, 1.4 mm per millisecond. Matching the column width to the LED spacing keeps circles round.

The camera. A tripod, manual mode, ISO 100, f/8, focus fixed by hand, and a shutter longer than the countdown plus the painting. The stick blinks a three-second countdown to sync with it.

The course

Build a light painting stick has six lessons, all on the same wiring:

  1. LED columns: one column of pixels as a number.
  2. Images to columns: pictures and words stored sideways.
  3. SD bitmaps: a real BMP, written and read back.
  4. Timing: column time and walking speed.
  5. Long exposures: camera settings and a countdown.
  6. Project: write your name in light: your name, in a rainbow.

Every step is checked against the running circuit, apart from the last, where you make the stick your own and share it.