Skip to content

Rotary Spinner Box

Rotary Spinner Box

A hand-held light-up box with a 12-LED strip that students control with a spinning knob (rotary encoder) and two buttons.

Source book: Moving Rainbow
Kit page: https://dmccreary.github.io/moving-rainbow/kits/rotary-spinner-box/
Printable one-pager: rotary-spinner-box-one-pager.html

Features

  • Run your first program on a real computer chip
  • Read a button press and a knob turn in code
  • Make a light move along the strip
  • Use a variable (a named box that holds a value) to change a pattern
  • Build a state machine (a program that can be in one of several modes)

Benefits

  • Free, open lessons: the Moving Rainbow textbook has the kit page, wiring, and MicroPython code.
  • Ready-made curriculum: 13 additional lab pages walk students through the build step by step.
  • Classroom friendly: built on a solderless breadboard or no-solder connectors.
  • Real-world data: students read sensors and turn measurements into decisions.
  • Budget: about $15.

Parts

  • Raspberry Pi Pico ($4) — Microcontroller
  • Momentary Push Buttons — Input button / switch
  • KY-040 Rotary Encoder — Input knob
  • WS2812B NeoPixels — LEDs
  • 830-Point Breadboard ($1.10) — Breadboard
  • Micro-USB Data Cable ($2.50) — Power and programming cable