My graduation cap runs Rust
A graduating student ingeniously crafts an LED-lit cap running Rust on an ATtiny85, triggered by tassel movement. This quirky DIY project showcases the challenges and satisfaction of embedded hardware and software development, especially when pushing unconventional language choices. It's a popular Hacker News story for its blend of academic tradition, creative engineering, and a dash of Rust-powered ambition.
The Lowdown
An enterprising student, facing the rites of college graduation, decided to inject some personal flair into the traditional cap and gown. Eschewing simple decoration, they embarked on a project to build an LED-illuminated graduation cap, specifically designed to react to the ceremonial movement of the tassel, all powered by Rust.
- The inspiration stemmed from the somewhat absurd traditions of graduation, such as renting expensive caps and gowns and the symbolic tassel shift.
- The core idea was to detect the tassel moving from right to left using a reed switch and a magnet, then trigger a light show on the cap's underside.
- Key components included a Digispark ATtiny85 microcontroller, 48 WS2812B LEDs, a USB-C Power Delivery trigger board, and a power bank.
- Developing the software in Rust proved to be a significant challenge, requiring about two hours of work to fork and patch libraries (avr-hal and ws2812-avr) for ATtiny85 compatibility, including setting the clock speed to 16 MHz.
- Hardware assembly and integration took over three hours, confirming the author's belief that custom hardware projects are inherently complex.
- Despite the technical achievement, the author ultimately deemed the illuminated cap too 'tacky' to wear to the actual graduation ceremony.
- A humorous warning for photosensitive individuals is included, preceding a video demonstrating the cap's rapid strobing effect.
- The full code for the project is openly available on GitHub.
This project stands as a testament to creative problem-solving and the willingness to tackle complex embedded development, particularly with a language like Rust, even if the final product was more a proof-of-concept than a fashion statement for the big day.