🧪 新教程持續更新中 · 由機械臂到傳感器,跟隨教程從零搭建
跳到主要內容

樹莓派: IIC通訊 ​

安裝相依性 ​

Plain
sudo apt-get update
Plain
sudo apt-get install -y python3-smbus python3-serial i2c-tools

啟用I2C ​

Plain
sudo raspi-config

選擇 Interface Options -> I2C -> Yes

重啟Raspberry Pi

檔案位置 ​

~/IIC_Voice/iic_voice.py

接線說明 ​

圖 1

執行 ​

Plain
cd IIC_Voice
Plain
python3 iic_voice.py

輸出格式 ​

Plain
Speech Serial Opened! Baudrate=115200
ID:4
ID:1
ID:10