Hi
Looked thru the other thread and made sure I’d installed the sensors package - rebooted - I2c is showing the 08 and 29 in the table
trying
import time
import easygopigo3 as easy
# Create an instance of the Distance Sensor class.
my_distance_sensor = easy.DistanceSensor() # Distance_Sensor will be the Line Follower object.
while True:
# Directly print the values of the sensor.
print ("Distance Sensor Reading (mm): " + str(my_distance_sensor.read_mm()))
getting
pi@gopigo3:~/GoPiGo3-master/Software/Python $ python sw.py
Traceback (most recent call last):
File "sw.py", line 5, in <module>
my_distance_sensor = easy.DistanceSensor() # Distance_Sensor will be the Line Follower object.
File "/home/pi/GoPiGo3-master/Software/Python/easygopigo3.py", line 2609, in __init__
Sensor.__init__(self, port, "OUTPUT", gpg)
File "/home/pi/GoPiGo3-master/Software/Python/easygopigo3.py", line 965, in __init__
raise TypeError("Use an EasyGoPiGo3 object for the gpg parameter.")
TypeError: Use an EasyGoPiGo3 object for the gpg parameter.
I went down this trobleshooting path as it was not showing up in Scratch sensors
There are two approaches to instantiating a distance sensor. I showed both in the code below.
You can also go “hard code” and use gopigo3 and di_sensors directly
how long ago did you get that easygopigo3 file?
We changed DI_Sensors at one point not that too long ago. If your easygopigo3 is not in sync, it would give us this current issue.