Am trying to get the distance sensor operational.
Running a simple program (easy.init_distance_sensor()
) yields:
Distance Sensor NOT found
class DistanceSensor has no attribute '__init__'
Traceback (most recent call last):
File "./DistSensor.py", line 6, in <module>
distSensor = botty.init_distance_sensor()
File "build/bdist.linux-armv7l/egg/easygopigo3.py", line 801, in init_distance_sensor
return DistanceSensor(port, self)
File "build/bdist.linux-armv7l/egg/easygopigo3.py", line 2290, in __init__
raise IOError("Distance Sensor not found")
IOError: Distance Sensor not found
My first thought is the device isn't present on the i2c bus. i2cdetect gives me:
i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- 08 -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- 29 -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
I’m not 100% sure how to interpret this. There appear to be a couple devices; one at address 0x08
, the other at 0x29
. An i2cdump of each shows all zeros for 08, and some non-zero data for 29. But I’m not sure what devices I’m really looking at.
Any other things I can try to narrow down what might be the root cause? That is, before I pull out multimeters & scopes to figure it out …