关于3D 打印的树莓派蜘蛛机器人的代码运行问题

咚咚锵 10cm2021-01-23978 次点击
按照视频一步一步做 运行Servo Motor Test.py文件时 报错
Traceback (most recent call last):
File "/home/pi/Desktop/Spider Robot Codes/Servo Motor Test.py", line 17, in <module>
pwm = Adafruit_PCA9685.PCA9685()
File "/usr/local/lib/python3.7/dist-packages/Adafruit_PCA9685/PCA9685.py", line 74, in __init__
self._device = i2c.get_i2c_device(address, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/Adafruit_GPIO/I2C.py", line 64, in get_i2c_device
return Device(address, busnum, i2c_interface, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/Adafruit_GPIO/I2C.py", line 97, in __init__
self._bus = Adafruit_PureIO.smbus.SMBus(busnum)
File "/usr/local/lib/python3.7/dist-packages/Adafruit_PureIO/smbus.py", line 125, in __init__
self.open(bus)
File "/usr/local/lib/python3.7/dist-packages/Adafruit_PureIO/smbus.py", line 150, in open
self._device = open("/dev/i2c-{‌0}".format(bus), "r+b", buffering=0)
FileNotFoundError: [Errno 2] No such file or directory: '/dev/i2c-1'
请大佬们指导一下 谢谢
收藏 ♥ 感谢
RaspiSQH 120.55m 2021-01-23  ♥ 1
raspi-config里面的i2c开了没
咚咚锵 10cm 2021-01-24 
@RaspiSQH 已解决 谢谢

登录注册 后可回复。




› 相关内容关注微信公众号