I am new to using the GoPiGo and I cannot install the DI Sensor.
I have tried installing the DI sensor on the command line of the pi using the instructions from this link but I get an error on the command line when I type in curl etc
If I try and import the sensors in python, I get this error
I am really new to using the GoPiGo so just trying to figure out how to use Python to program the sensors, if anyone can offer advice on how to solve this problem and point me in the right direction, I would be grateful
Sorry - I should have asked the OS question first. I have not ventured into DexterOS. It may be that DexterOS already has the DI sensor code installed.
(Do any of the examples that import easygopigo3 work (instead of importing the DI sensors package)?
Like this:
import easygopigo3 as easy
import time
# create an "easy gopigo" instance
egpg = easy.EasyGoPiGo3()
# create a distance sensor instance
my_ds = egpg.init_distance_sensor()
while True:
# Directly print the values of the sensor.
print("Distance Sensor Reading: {} mm ".format(my_ds.read_mm()))
time.sleep(5)
I tried the code you mentioned, below is the error I got once I ran the code
If I download raspbian for robots, would it be easier? I found this link last night and downloaded the image, can you confirm if it is the right image?
If I am running raspbian for robots, can I still connect to the gopigo using wifi and type in mygopigy.com and use the programming environment created by Dexter?
The sensor is working if I use bloxter but it isnt working using the commands I have online in Python.
If you could direct me to a guide for raspbian for robots, I am hoping I will then have more luck.
Thank you again for your reply, really appreciated.
Please let the DI folks have a shot at helping you in the environment you have already invested time to become familiar with. They can get your environment configured to use the distance sensor in python in DexterOS. The fact that it works in Bloxter, which is a visual layer over python, means you are very close, with working hardware.
Thank you, appreciate your reply. I have tried absolutely everything but really getting stuck with making sure the DI sensor is installed. Hopefully someone replies to this thread soon as I think this is going to the same problem for all sensors. Whilst I wait for someone to reply, can you direct me to somewhere that will show me a list of python commands for the Dexter OS? I have their pdf guide so want to check that it is not a NOOB mistake.
Hello there,
I’ll try to help as much as I can
First, are you on DexterOS or on Raspbian for Robots?
My guess is that you are using a pretty old version of DexterOS. Your image in the original post shows the Adafruit_WebIDE folder which we no longer use.
jupyter user doesn’t have the permissions to use elevated permissions (sudo).
If you were to type in the password, it would still not work. And just for the record, the jupyter's password is jupyter.
thank you all for your replies, everything is built in so I do not need to make any changes, the older version I edited the setup but can see it is not required here.
I am using the documentation to measure the distance so the robot then responds, can some advise what the issue is here?
Thank you all of your help, trying to get used to this environment.
Also I would advice not to use time.sleep(1) after the gpg.forward() in your forever loop.
If an obstacle shows up during that time, it would not get detected.
Sleep for a tiny amount (like 0.05 seconds) just to keep the loop from looping too fast.