Since I had installed PLEX and Pi-Hole on my RPi, I needed a good cooling system. First was to stick a simple heat sink, but I wanted a bit more. I found this great Raspberry Pi RGB Cooling HAT with adjustable fan and OLED. But since I am using Ubuntu Core, a few more tweaks are needed.

Installing dependencies

First we need to add the few python 3 dependencies needed by the scripts reading from the I2C pins.

sudo apt install -y python3-smbus i2c-tools python3-pip python3-pil python3-rpi.gpio python3-setuptools
sudo pip3 install Adafruit-SSD1306

Testing the monitoring program

I have customized the scripts given by the manufacturer to do the following:

  1. Remove program outputs
  2. Tweak the fan speed up and down depending on CPU temperature

The scripts are available here:

The best way is to clone the git repository and copy the necessary files to /opt

cd /tmp
git clone
cd /tmp/raspi-utils
sudo mv cooling-hat-oled /opt/cooling-fan
cd /opt/cooling-fan
chmod +x
sudo ./

Reboot your RPi and you’re good to go!