DEV Community

Cover image for Using Pimoroni Ubercorn and Pi Zero for my "On Air" Sign

Using Pimoroni Ubercorn and Pi Zero for my "On Air" Sign

So Mick pointed out that I can use one of the LEDs we have in the office and create an "On Air" sign for when I'm doing my podcast recordings, or when I'm live-streaming events and these end up as recordings also. It's not necessarily for normal zoom calls or meetings.

So why not!

Anyway my main list of components to get started:

  • Pi Zero
  • Pimoroni's Ubercorn
  • USB to MicroUSB cable (to give power to the Pi Zero)

After flashing and setting up Pi Zero, and attaching Pimoroni’s Ubercorn, made sure Python is up-to-date (and any other system updates it requires as it was flashed with a new and latest Rasbian OS image.

Checked out Pimoroni's Ubercorn repo on github

GitHub logo pimoroni / unicorn-hat-hd

Python library and examples for Unicorn HAT HD

Unicorn HAT HD http://shop.pimoroni.com/products/unicorn-hat-hd

Build Status Coverage Status PyPi Package Python Versions

Installing

Full install (recommended):

We've created an easy installation script that will install all pre-requisites and get your Unicorn HAT HD up and running with minimal efforts. To run it, fire up Terminal which you'll find in Menu -> Accessories -> Terminal on your Raspberry Pi desktop, as illustrated below:

Finding the terminal

In the new terminal window type the command exactly as it appears below (check for typos) and follow the on-screen instructions:

curl https://get.pimoroni.com/unicornhathd | bash
Enter fullscreen mode Exit fullscreen mode

If you choose to download examples you'll find them in /home/pi/Pimoroni/unicornhathd/. To prototype and try out your code without having to deploy it onto a Raspberry Pi every time, you can use the Unicorn HAT simulator to run a mock Unicorn HAT on your computer.

Manual install:

SPI needs to be enabled to communicate with the Unicorn Hat HD. If the SPI on your Pi is not enabled or you are unsure if…

Because of these examples...
https://github.com/pimoroni/unicorn-hat-hd/tree/master/examples

...I also needed to install the following:

  • numpy
  • fontconfig

fontconfig as I needed fc-list

  1. Install fontconfig sudo apt install fontconfig
  2. Copy .ttf fonts to /usr/share/fonts/truetype
  3. Rebuild font cache fc-cache -f -v

Next I need to install Pillow:

sudo pip3 install pillow
Enter fullscreen mode Exit fullscreen mode

Had problems import libraries from PIL saying it can’t find libopenjp2.so.7, and this solved it:

sudo apt-get install libopenjp2-7
Enter fullscreen mode Exit fullscreen mode

When I tried to import from PIL again, I get another error relating to lib tif.so.5 not found, so installed the following:

sudo apt install libtiff5
Enter fullscreen mode Exit fullscreen mode

And yay, that fixed those problems. Weird.

Ran the Python test code, and it worked! πŸ™Œ

Ended up using this example code instead:
https://github.com/pimoroni/unicorn-hat-hd/blob/master/examples/rainbow-text.py

Videos in action

With a diffuser... ooooh... aaaah! Tis a piece of white A4 paper on top of the LED lights. πŸ˜†

My next steps

Then I'll give the Ubercorn some juice so I can hang it up on the wall, and it’s ready to go whenever I’m recording podcasts or doing live event streams and so on. 😊

Hopefully the next part will be done and I can show the final results.

Top comments (0)