I’ve put my new GoPiGo2 starter kit together and put the servo and the ultrasonic sensor through their paces.The servo seems to be working fine, although I’ll have to get used to enabling/disabling it (and I should recenter it).
I’m afraid I think the ultrasonic sensor is broken, though. After toying with it a bit and getting odd readings, I checked in the forums and found a few threads on the matter. I ended up running grove_distance_sensor.py in the following configurations (adjusting the source code to use the correct pin each time).
- On battery power (gpg reports 10.39 V) on the analog port (labeled A1)
- On battery power (gpg reports 10.36 V) on the digital port (labeled D11)
- Powering the Raspberry Pi via micro-usb (battery disconnected) on the analog port
- Powering the Raspberry Pi via micro-usb (battery disconnected) on the digital port.
During each run I held a large thick book directly in front of the sensor, and slowly moved it back and forth. In each configuration, the values from the sensor seemed reasonably accurate, but only up to 8cm or so. Then, no matter how much farther I moved the book, the values would almost never veer away from 7, until I got closer than around 7 or 8 cm.
Before the test I made sure to run DI software update. I updated both Raspberry for Robots and the GoPiGo firmware, being careful to remove the motor leads ( and the other sensor leads) before I started the GPG to perform the update.
gpg reports the firmware at 1.6