Install the robot-hat ModuleΒΆ

robot-hat is the supported library for the Robot HAT.

Warning

  • When installing the Raspberry Pi OS, please use the Raspberry Pi OS (Legacy) version - Debian Bullseye.

  • If the version you install is Bookworm, the Speaker will not function properly.

_images/3d33.png
  1. Update your system.

    Make sure you are connected to the Internet and update your system:

    sudo apt update
    sudo apt upgrade
    

    Note

    Python3 related packages must be installed if you are installing the Lite version OS.

    sudo apt install git python3-pip python3-setuptools python3-smbus
    
  2. Type this command into the terminal to install the robot-hat package.

    cd ~/
    git clone -b v2.0 https://github.com/sunfounder/robot-hat.git
    cd robot-hat
    sudo python3 setup.py install
    

    Note

    Run setup.py to download some necessary components. You may have a network problem and the download may fail. At this point you may need to download again. In the following cases, type Y and press Enter to continue the process.

    _images/dowload_code.png