Download and Run the CodeΒΆ

First download and run the robot-hat module.

cd /home/pi/
git clone https://github.com/sunfounder/robot-hat.git
cd robot-hat
sudo python3 setup.py install

Note

Running setup.py 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.

../../_images/dowload_code.png

Then download the code and install the piarm library.

cd /home/pi/
git clone -b 2.0.0 https://github.com/sunfounder/piarm.git
cd piarm
sudo python3 setup.py install

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

Finally you need to run the script i2samp.sh to install the components needed for the i2s amplifier, otherwise it may not have sound.

cd /home/pi/piarm
sudo bash i2samp.sh
../../_images/i2s.png

Type y and press Enter to continue running the script.

../../_images/i2s2.png

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

../../_images/i2s3.png

Enter y and press Enter to restart the robot.

Note

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