I have motors for wheels and distance sensor connected to the GoPiGo3 board. The motors are working fine but the code which involves distance sensor throws an error as shown below:
Distance Sensor init: [Errno 2] Opening I2C device: No such file or directory
Traceback (most recent call last):
File “E-Bot.py”, line 49, in
my_distance_sensor=gpg.init_distance_sensor() # Distance Sensor goes on A1
File “build/bdist.linux-armv7l/egg/easygopigo3.py”, line 881, in init_distance_sensor
File “build/bdist.linux-armv7l/egg/di_sensors/easy_distance_sensor.py”, line 37, in init
File “build/bdist.linux-armv7l/egg/di_sensors/distance_sensor.py”, line 28, in init
File “build/bdist.linux-armv7l/egg/di_sensors/VL53L0X.py”, line 116, in init
File “build/bdist.linux-armv7l/egg/di_sensors/dexter_i2c.py”, line 52, in init
File “build/bdist.linux-armv7l/egg/periphery/i2c.py”, line 58, in init
File “build/bdist.linux-armv7l/egg/periphery/i2c.py”, line 74, in _open
periphery.i2c.I2CError: [Errno 2] Opening I2C device: No such file or directory
Read_Info.py
Manufacturer : Dexter Industries
Board : GoPiGo3
Serial Number : 0F427793514E4C47324B2020FF050F19
Hardware version: 3.x.x
Firmware version: 1.0.0
Battery voltage : 4.163
5v voltage : 4.797