robot-hat is the supported library for the Robot HAT.
Type this command into the terminal to install the Robot HAT package.
git clone https://github.com/sunfounder/robot-hat.git cd robot-hat sudo python3 setup.py install
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.