Select Page

Cryptocurrency monitor with Unicorn HAT

Cryptocurrency monitor with Unicorn HAT

Unicorn pHAT and HAT. 32 or 64 blinding ws2812 pixels for your Raspberry Pi. it is called Unicorn Hat because it does rainbows, really bright rainbows! ATTENTION: do not stare directly at the led without a sheet of paper on it. LED are REALLY bright!

Shopping list

You need obviously a raspberry pi, ideally with WIFI build in if you don’t like cables

  • Raspberry Pi 1 is not supported by Unicorn Hat
  • Raspberry pi 2 , dual core, will require an Ethernet cable, can still be found on ebay, graiglist. Consume half the power of a PI 3 or 4
  • Raspberry pi 3 or 4, quad core, a bit a shame to use this amount of power for that task, but has built in WIFI!

and a Unicorn HAT from I’ve got mine used in flea market 🙂

Unicorn HAT Features

  • It works on Raspberry pi 4, 3+, 3, 2, A+ and Zero
  • 64 RGB LEDs (WS2812B)
  • LED data driven via DMA over PWM
  • Unicorn HAT pinout
  • Compatible with all 40-pin header Raspberry Pi models
  • Python library
  • Comes fully assembled
  • Warning: WS2812 LEDs are bright enough to cause eye pain, do not look at them directly when brightly lit. is recommended to use a diffuser.
  • Photo-sensitivity warning: flashing, strobing, and patterns of lights may cause epileptic seizures. Always take care and immediately stop using if you feel unwell (dizziness, nausea, affected vision, eye twitching, disorientation).
  • Power: Unicorn HAT requires a >2A microUSB power supply for your Pi.


Raspbian is THE official operating system for all models of the Raspberry pi.

Raspbian is a Debian-based (32 bit) computer operating system for Raspberry Pi. There are several versions of Raspbian including Raspbian Buster and Raspbian Stretch. Since 2015 it has been officially provided by the Raspberry Pi Foundation as the primary operating system for the family of Raspberry Pi single-board computers.


We now use the Raspberry Pi Imager for an easy way to install Raspbian and other operating systems to an SD card ready to use with your Raspberry Pi:

Choose Raspbian (other), then lite version connect HDMI, Keyboard, mouse (and network cable or you can use WIFI)

Add a new file ‘ssh’ to the first partition, to enable ssh. Boot the PI and connect to the console.


Install Unicorn HAT

# Unicorn Hat is easy to set up, from
curl -sS | bash

Install the software

We use the project Unicorn-scroller and modify it to support querying the Coingecko free API

CoinGecko is a cryptocurrency ranking web site that provides 360 degree overview of the standing of digital currencies. The cryptocurrency ranking is quantitatively and qualitatively evaluated based on public data collected from the internet. Metrics considered include market capitalization, liquidity, developer activity, community, and public interest.

I did open a Pull Request at as long as it is not merged into unicorn-scroller, we will use my fork

sudo apt-get install git python-pip libfreetype6-dev python-imaging python-feedparser fortune-mod -y
sudo pip install Pillow, pyephem, pycoingecko

# a pull request has been opened
# in between use my fork
git clone
cd unicorn-scroller
git checkout cryptocurrencies

# get 8x8 True Type font, from /home/pi/unicorn-scroller
wget -O

# delete all in  /home/pi/unicorn-scroller/messages/ except bitcoin and ethereum
ln -s bitcoin 01-00
ln -s ethereum 01-00

# run to test
sudo ./

Run at boot time

To run on system boot, add the following to /etc/rc.local (before the “exit 0” line at the end):

(cd /home/pi/unicorn-scroller && python

0 0 votes
Article Rating
Notify of
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x