树莓派4B对GPIO扩展板操作smbus

1/首先更新下

sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get dist-upgrade -y

2、安装 adafruit_blinka CircuitPython库

pip3 install adafruit-blinka

3、注意安装下面的库

sudo pip install Adafruit-SSD1306

4、安装相应的库

sudo apt-get install -y python-smbus
sudo apt-get install -y i2c-tools 

5、运行 sudo raspi-config 

sudo raspi-config 

注意,把interface相关的都使能了

6\其它

用热点安装

#删除原有python2的软链接
sudo rm /usr/bin/python

#新建python3的软连接
sudo ln -s /usr/bin/python3.7 /usr/bin/python 


sudo python -m pip install --upgrade pip setuptools wheel
sudo apt-get install python-pil python3-pil
git clone https://github.com/adafruit/Adafruit_CircuitPython_SSD1306.git
sudo pip install Adafruit-SSD1306

你可能感兴趣的:(树莓派4B和ROS,linux)