Raspberry Pi Beret
A classic song becomes a cool project, with this beret being powered by a Raspberry Pi Pico W. In the latest issue of The MagPi, Rob Zwetsloot puts his journalist hat on to investigate.
Way, way back in The MagPi 47, Alan McCullagh built a very special Raspberry Pi-powered beret, complete with a hidden camera and Prince symbol in an homage to the then recently-deceased pop icon. The Raspberry Beret joke has been around since even before Raspberry Pi came out, and with cosplayers and makers congregating in San Jose for SiliCon in August 2022, Sean O’Steen decided to do his own take.
“While not prepared for a full cosplay presentation like many other attendees at the convention, I certainly wanted to let my geek flag fly,” Sean tells us. “Knowing that Raspberry Pi would be one of the companies with a booth at the convention, I wanted to pay homage to the people and the products that made possible most of my home automation projects, and much of my journey into electronics self-learning. I used one of Raspberry Pi’s latest microcontrollers, Pico W, and some addressable LED lights to create the Raspberry Pi Beret; the kind you won’t find in a second-hand store.”
The beret has two modes. When ‘idle’, the beret’s LEDs light up around it with ever cycling animations at random intervals. With a phone connected to the wireless LAN on Pico W, Sean was able to control the lights from the web browser.

“Since the convention was going to be a busy place, I chose to make the animations about safety and traffic control,” he explains. “I could signal my turns, my stops, and turn on my hazard lights if I planned to stay in one place for a while.”
First principles
If you follow Raspberry Pi on social media, you’ll know that the team was showing off wearables that would be with them at the event. This gave Sean the idea to make the beret.
“As with most of my workshop projects that involve soldering or hot glue, I have some scars to show for my effort,” he admits. “Assembling electronics that are flexible is always a challenge. The most significant challenge to building this hat was how do I hide the LED strips in a really small headband. Fortunately, I found an old black and white striped Lycra swim shirt; we call them rash guards around here. The LEDs shine brightly through the white stripes in the fabric, while the black fabric conceals the rest of the LED circuit board. If the lights aren’t on, you might not notice that there are any electronics on the beret. Once the LED concealment was complete, the rest of the time was spent programming Pico W.”

He made use of Alasdair Allan of Raspberry Pi’s web server tutorial (in The MagPi 121) and a multi-threading video from Bytes N Bits to make it speedy. On boot, the wireless chip is configured as an access point for the paired smartphone. One core of RP2040 handles the web service and phone requests, while the other core handles the animations – it’s very elegant.

Heading to the future
“Before the convention started, my friends used my hat as a beacon to find me waiting in line outside the convention centre,” Sean tells us. “Once I got inside the convention centre, I received very kind feedback from many of the attendees. The team from Raspberry Pi spotted me from at least ten metres away as I approached their booth, and were thrilled to see the Raspberry Pi Beret in action.”
For now the beret will live on display in his office as a great reminder of a fun convention. It’s also inspired his son to make a robot with some LED animations as well – we look forward to seeing Beretbot in the future.
4 comments
Jump to the comment form
Alan McCullagh
Bravo and good job Sean, and thanks to both Sean and Rob for that particular earworm! It’s been a long time since I had that recurring tune in (or on) my head :oD Hadn’t been on social media in so very long and the first thing I fell upon was this via this morning’s tweet. Looking forward to checking out the GitHub repo.
More power to your beret!
Raspberry Pi Staff Liz Upton
Alan! You are SORELY missed. Saw you on Instagram, but drop me a line – I’d love to catch up!
UKScone
Of course you missed him. He keeps ducking and standing on the other side of bodies of water. You need to practice your rock skimming if you want to hit him. Think you’ll need a 2 thousander at least
UKScone
It Lives. Long time no see online you old fogie