HeadlinesBriefing favicon HeadlinesBriefing.com

Purdue Student's Rust-Powered LED Graduation Cap

Hacker News •
×

A Purdue student built a graduation cap that lights up with WS2812B LEDs when the tassel is moved, running Rust on an ATtiny85 microcontroller. The project started as a joke about setting the cap on fire during the ceremony, then evolved into a detection system using a reed switch and magnet to trigger the LEDs.

The hardware uses a Digispark ATtiny85 board, reed switch with magnet to detect tassel movement, USB-C Power Delivery trigger board, and a power bank. Getting Rust to work on the ATtiny85 required forking the avr-hal and ws2812-avr libraries since they don't support this chip out of the box, along with adjusting the clock speed to 16 MHz.

Writing the code took about 2 hours, while the hardware side took 3+ hours. The student decided not to wear the cap to graduation—it looks "tacky" and what "boomers would think of as a seizure." The code is available on GitHub.