Rust on an ATtiny85: A Rube Goldberg LED Graduation Cap
A Purdue graduate built a microcontroller-driven LED graduation cap programmed in Rust, triggered by a reed switch and magnet that detects the ceremonial tassel flip. The hardware stack is deliberately minimal: a Digispark ATtiny85 drives 48 WS2812B addressable LEDs, powered by a USB-C PD trigger board and a power bank, with wiring scavenged from a dead Apple cable.
The interesting engineering detail is the toolchain wrangling. The avr-hal and ws2812-avr crates don’t support the ATtiny85 cleanly, so the author forked both and patched them, including forcing the default clock to 16 MHz. Coding took roughly two hours; the hardware assembly took longer, as is usually the case with one-off physical builds. The author notes a larger board like an ESP32 would have simplified things but wouldn’t have physically fit on the cap.
The project, published as gradcap-rs on GitHub, ultimately won’t be worn at the ceremony — the author judged the strobing aesthetic too tacky. It’s a small but solid demonstration of using Rust on resource-constrained 8-bit AVR hardware, a niche where the C/Arduino ecosystem still dominates and Rust support remains rough around the edges.
Read the full article
Continue reading at Hacker News →This is an AI-generated summary. Read the original for the full story.