Quick installation of Melopero FAN HAT

Installation of Melopero FAN HAT

To install the Melopero FAN HAT, from the start menu open a terminal window

In the terminal, type the following command and press enter:

sudo pip3 install --no-cache melopero-fan-hat

Wait for the installation to finish and restart the Raspberry Pi with the following command:

sudo reboot now

After restarting the Raspberry Pi la FAN HAT it will activate automatically. By default, the “ALWAYS ON” option is enabled, for this reason the fan will turn on after the restart maintaining a minimum speed equal to 30% of the maximum power, regardless of the CPU temperature. You can disable this option or change its parameters by editing the Python3 file that manages the fan (continue reading for more details and for information on uninstalling)

During the installation procedure a new folder is created in the / home directory of the Raspberry Pi, called "melopero-autostart ". Inside the folder melopero-autostart, there are two other subfolders, called "scripts" and "uninstall", inside which are respectively the fan_controller.py, which manages the fan, and the file to be launched to uninstall the FAN HAT.

To access the fan controller, enter the "scripts" folder by typing the following command:

cd /home/melopero-autostart/scripts

Once inside the "scripts" folder, to edit the fan_controller.py, type the following command:

sudo nano fan_controller.py

the file fan_controller contains some comments that will allow you to understand the meaning of the various modifiable parameters.


To uninstall the Melopero FAN HAT and the form melopero-autostart, enter the uninstall folder by typing the following command:

cd /home/melopero-autostart/uninstall

Once inside the uninstall folder, type the following command:

sudo ./uninstall.sh

You will be prompted twice for permission to proceed with the uninstallation of melopero-autostart e melopero-fan-hat. Answer "y" and hit enter on both requests. Below is a screenshot of the screen you should see once the uninstall is complete, starting with the initial command "sudo ./uninstall.sh"

melopero logo

For more information on the software, visit our GitHub page by clicking HERE.