2018_06_27 rasbian for robots
I have moved on from the dexterOS and onto rasbian for robots - I’m just at very basics at the moment but my ultradistancesensor (googly eyes one), despite seemingly working fine with Bloxter on dexterOS, it does not seem to be working now, on raspbianfor robots.
I have it plugged into I2C.
dist.py looks like:
1 from easygopigo3 import EasyGoPiGo3 2 # create an EasyGoPiGo3 object 3 gpg3_obj = EasyGoPiGo3() 4 5 # variable for holding the port to which we have the ultrasonic sensor connected to 6 port = "I2C" 7 8 ultrasonic_sensor = gpg3_obj.init_ultrasonic_sensor(port) 9 10 # read the sensor's measured distance as in the previous example 11 distance_cm = ultrasonic_sensor.read()
and i get the following error:
Traceback (most recent call last): File "dist.py", line 8, in <module> ultrasonic_sensor = gpg3_obj.init_ultrasonic_sensor(port) File "build/bdist.linux-armv7l/egg/easygopigo3.py", line 909, in init_ultrasonic_sensor File "build/bdist.linux-armv7l/egg/easysensors.py", line 782, in __init__ File "build/bdist.linux-armv7l/egg/easysensors.py", line 429, in __init__ File "build/bdist.linux-armv7l/egg/easysensors.py", line 217, in set_pin AttributeError: 'UltraSonicSensor' object has no attribute 'pin'
any help would be great, many thanks.