A shake-to-cast light spell for the laptop, built in one makers session.
The spell, technically
Two halves talking over Bluetooth. On the wand, MicroPython reads the accelerometer twenty times a second — three spikes over the threshold inside a window count as a shake, and a 1.5-second cooldown keeps one flourish from casting five spells. It plays a falling-pitch swoosh on its own speaker and sends theme_toggle over BLE (Nordic UART), advertising itself as Claude_XXXXXX. On the Mac, a Python listener catches the message, synthesizes an answering swoosh from a raw sine sweep — no audio files anywhere, the sound is generated each cast — and flips the system appearance via AppleScript. The wand draws its own little status screen: connection state, shake count, spell log.
Built in one sitting
This came out of a Code with Claude makers session in May 2026, on top of Anthropic's Cardputer starter kit — the starter provides the flashing and app plumbing, and the magic lives in two files: shake_theme.py on the device, theme_listener.py on the laptop (source).
Why a wand
Environments shape how people feel — that's the thesis behind everything in this city. The dark/light switch is an environmental change, so it deserved an environmental gesture: something physical, a little theatrical, slightly ridiculous. A shake. Interfaces don't have to live behind glass.