Download and Run the Code

We can download the files by using git clone in the command line.

Install robot-hat library first.

cd /home/pi/
git clone
cd robot-hat
sudo python3 install


Running will download some necessary components. You may fail to download due to network problems. You may need to download again at this time. In the following cases, enter Y and press Enter.


Then download the code and install pisloth library.

cd /home/pi/
git clone -b v2.0
cd pisloth
sudo python3 install

This step will take a little time, so please be patient.

Finally, you need to run the script to install the components required by the i2s amplifier, otherwise the pislot will have no sound.

cd /home/pi/pisloth
sudo bash

Type y and press Enter to continue running the script.


Type y and press Enter to run /dev/zero in the background.


Type y and press Enter to restart the machine.


If there is no sound after restarting, you may need to run the script multiple times.