安装所有模块(重要)
准备系统
确保你的 Raspberry Pi 已连接到互联网,然后更新系统:
sudo apt update sudo apt upgrade
备注
如果你使用的是 Raspberry Pi OS Lite,请先安装所需的 Python 3 软件包:
sudo apt install git python3-pip python3-setuptools python3-smbus
安装 robot-hat
下载并安装
robot-hat模块:cd ~/ git clone -b 2.5.x --depth=1 https://github.com/sunfounder/robot-hat.git cd robot-hat sudo python3 install.py
安装 vilib
下载并安装
vilib模块:cd ~/ git clone https://github.com/sunfounder/vilib.git --depth 1 cd vilib sudo python3 install.py
安装 picrawler
然后下载代码并安装
picrawler模块。cd ~/ git clone --depth=1 https://github.com/sunfounder/picrawler.git sudo pip3 install ~/picrawler --break-system-packages
此步骤需要一些时间,请耐心等待。
启用声音(I2S 放大器)
要启用音频输出,请运行
i2samp.sh脚本以安装所需的 I2S 放大器组件:cd ~/robot-hat sudo bash i2samp.sh
按照屏幕提示输入
y并按 Enter 继续,在后台运行/dev/zero,然后重启 Picar-X。备注
如果重启后没有声音,请尝试多次运行
i2samp.sh脚本。