Grad-to-be turns graduation cap into Rust-powered light show

Offbeat

Eric Park tells us he doesn’t plan to wear his modified cap to commencement, but his code’s available for anyone with no such qualms and an upcoming ceremony

College graduation season has begun in the United States, and one soon-to-graduate computer science student has decided to decorate his graduation cap in the way any good maker would: by writing some Rust code and wiring it up with LEDs that light up when the tassel moves from right to left.

Eric Park, due to walk in his commencement ceremony on Friday at Purdue University, published a blog post this week explaining the project, which he said he undertook as an alternative to building a contraption that would set his mortarboard aflame when the tassel was moved. 

Unfortunately for Park, many American universities (and some in other countries like the UK) require college students who want to walk in commencement ceremonies to rent their gowns and mortarboards. It’s not uncommon for students to be charged a ludicrous amount to rent the set, and in many cases, rental companies require students to return their mortarboards and gowns alike, as is the case for Park.

“The rental agreements clause 98.c.2 probably forbids [burning a rented mortarboard], and I don’t think Purdue would like it very much if I set the stage on fire,” Park said in the post. An easier-to-remove version consisting of LED strips, a reed switch, and a magnet, controlled by a super-tiny Digispark ATtiny85, presented itself as the alternative. 

The result, as demonstrated in a YouTube video, is a mortarboard that is all aglow, and flameless, as soon as the reed switch is activated by the magnet placed on the left-hand side of the hat. 

“The entire thing was stuck on with double-sided tape and Kapton tape, and I tried a small patch just to make sure it wouldn’t rip up the fabric,” Park told The Register in an email. 

The lightweight and easy-to-remove design also necessitates a compact power source. Unfortunately, Park had to settle for an external battery pack carried in the pocket to power the unit. “It was going to be all self-contained with a 21700 cell, but I didn’t have a boost converter on hand so I decided to make do with the power bank solution,” the soon-to-be graduate told us. 

According to Park, the build was relatively quick: Hardware took a bit more than three hours, and that was largely because he no longer had access to a full lab and was stuck working with his home toolset. Writing the code took a couple of hours, which Park attributed to his insistence on using Rust.

“It probably would’ve been easier if I didn’t use Rust and just used the Arduino libraries, or if I used a different board,” Park explained in his blog post. “But I was really married to this blog post title … and I was pretty sure an ESP32 board would’ve been overkill and wouldn’t have stayed on the cap properly.” 


Eric Park’s finished mortarboard. Credit: Eric Park

For those who haven’t clicked through to read his blog post, its headline is simply “my graduation cap runs Rust.” That’s a pretty solid title – at the very least, it’s going to get people to read it, and read they have. 

“I’ve read through the comments on Hacker News and I’m happy and thankful about all of the positive comments,” Park told us. “It’s great to see a silly but fun project like this reach a wide audience.” 

“I particularly liked the guy that was reminded why he got into this field through my project,” Park added. 

So, will Purdue students graduating alongside Park get treated to a surprise light show? Sadly, no – he said in the blog post, and reiterated to us, that he’s probably not going to wear it during the ceremony. 

“I thought about it but decided it looks pretty tacky,” Park wrote in his blog post. “It looks like what kids would think of as a gaming PC and what boomers would think of as a seizure.”

He might toss it on for photo ops after the ceremony, but that’s about it, Park told us. 

That said, Park did publish the code on Github, so if some other all-but-commenced college student were to take it upon themselves to build their own copy and wear it during their ceremony, that’s on them. 

If I were graduating, I’d consider adding some speakers to the setup and piping in some music, too. Don’t come running to El Reg if such a move gets you in trouble, though: We claim no responsibility for commencement shenanigans. ®

Source link

Leave a Reply

Your email address will not be published. Required fields are marked *