python smbus IOError: [Errno 2] No such file or directory

 

1. Open the configuration file

sudo nano /boot/config.txt

Open the following options

"dtparam=i2c_arm=on"

ctrl + o Save

ctrl + x to exit

 

2. Refresh Profile

sudo raspi-config

 

3. Open the Options I2c

 

4. Restart

 

5. Run again

 

reference:

https://www.raspberrypi.org/forums/viewtopic.php?t=100189

Guess you like

Origin www.cnblogs.com/sea-stream/p/11111827.html