Download and Run the CodeΒΆ

First download and run the robot-hat module.

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


Running will download some necessary components. Due to network problems, you may not be able to download successfully. You may need to download it again.

In this case, type Y and press Enter.


Then download the code and install the piarm library.

cd /home/pi/
git clone -b 2.0.0
cd piarm
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 needed for the i2s amplifier, otherwise it may not have sound.

cd /home/pi/piarm
sudo bash

Type y and press Enter to continue running the script.


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


Enter y and press Enter to restart the robot.


If there is no sound after a restart, you may need to run the script several times.