I just received the GoPiGo starter kit! It has been FANTASTIC so far!! One issue I am running into is that the Ultrasonic sensor doesn’t seem to work.
I have connected the sensor to the A1 port. The issue is that the sensor always returns a reading between 670 - 675 cm, regardless of the actual distance from objects in front of it. I have tried the basic_test_all.py, basic_obstacle_avoid.py, us_servo_scan.py, and none of these tests are giving me the expected results due to the above issue. I have tried reseating the connections multiple times.
Hi Karan,
I meet the same problem. The reading sensor values are always 670,671,672 no matter where the obstacle is when using function us_dist(15) (because I connect it to A1 port). I have tried your method and find that the print show me that my port is 10 (it should be 15).Then I try us_dist(10) and the reading sensor values become 0 all the time. Can you help me find the solutions, since I have tried to reboot the system, change batteries, re-connect the ultrasonic sensor and even restart my computer as well. None of them solved my problem.
I will appreciate if you can help since ultrasonic sensor is very important to the GoPiGo car.
Hi Rui,
Sorry for taking this long to reply back. I had missed this post. I think we have already shipped a new sensor to you. In the meanwhile it would be great if you could run the troubleshooting script by following the instructions here: https://www.youtube.com/watch?v=ZMadpIEYq5o and upload log to the forums. It would help us to see if there is anything wrong with the software or settings.
According to the log_amol.txt file I attached earlier, I am on firmware version 1.6. Isn’t that the latest version? I repeated the firmware update steps, and I am still on version 1.6.
I connected the distance sensor to port A1 and repeated the example, and got the same results as before, even after I explicitly set distance_sensor_pin = 15.
One thing I noticed today is that when I connected the RaspberryPI to the USB power supply for the firmware update, the ultrasonic sensor got pretty warm to touch. It does not warm up this way when the GoPiGo is connected to battery power.
I purchased the GoPiGo directly from the Dexter Industries website. I received it around June 1st, and the ultrasonic sensor has never worked for me.
Hey Amol,
Sorry for the wrong link, the reason I was asking for you to run the firmware update was that the i2cdetect was showing a no device on the I2C bus which looked a bit weird. Can you run i2cdetect -y 1 on the terminal and check if you can see a device on 0x08. Also, does everything else work fine on the GoPiGo.
The sensor should not warm up and might be a bad sensor. Thanks for testing it out. I’m really sorry for the frustration.
Can you contact us here, under “General Questions and Feedback”: http://www.dexterindustries.com/site/?page_id=65. We will have one shipped to you immediately. Please post a link to this forum post when you reply us and it would be great if you could send the bad sensor back to us when you receive the newer one so that we can have a look at what went wrong with that one
Again, I’m really sorry to hear about this; we’ll make it right immediately.
I was having the same issue with my GoPiGo2. What seems to be the issue is exactly what my father told me: that the ultrasonic sensor is timing out. If you’re sleep counter is too small, then the reading won’t come back accurately. In my case:
time.sleep(.1)
was too small, so in order to fix it, you need to increase the sleep time to .2.
In order to test it, I created a modified version of the Avoider program example, replacing the movements with LED ons an offs and making it never break: