I have a gopigo and am now now interested in programming with sensors. I’m getting the sound sensor and I was wondering if there were any tutorials or example codes with this sensor? I’m interested in making the robot do something when it hears a beep. Any ways to do this? I’m using python.
I also have a GPS sensor and I’m following the directions here
cd Desktop/GoPiGo/Software/Python/Examples/GPS Bot/ but It said there was no such thing.
The instructions say two things that I didn’t do but I don’t think that they have to do with this not working
They said to switch the yellow and white cables and cross them over, so that the connector is now “BRYW” from the original “BRWH” configuration. I’m confused on how to do this and the GPS sensor does light up…
The second thing was that I don’t have a wi-fi dongle. I’m using gopigo 2 and I can connect to the computer via wi-fi without the dongle so I just assumed it wasn’t necessary.
Any help with either of the sensor will be greatly appreciated
We do have a sample code to use the sound sensor here. This is for the GrovePi, so to have it work with GoPiGo,you will have to connect this sensor to the Analog Port and run this code.
However it would be hard to use the sound sensor to make it to detect a beep sound, since this sound sensor isn’t sensitive enough to respond to events of short duration and signal processing of audio isn’t possible to detect the sound. Sound sensor gives a relative analog value of the received sound.
Regarding the GPS Bot, it looks like you are using a different location for GPS bot, the location of GPS bot folder is this
The wifi dongle isn’t necessary but we recommend a wifi dongle to have a strong internet connectivity as we find the inbuilt adapter in Pi3 to drop at times.
Adding a little more about the GPS sensor, the path in the example has changed and you should use the path that shoban has mentioned above. Also, you should first try to run the other example in the folder .
Once you are able to get reading in this example, you should move to the other one. If you do not get the reading, try swapping the yellow and white wires to the original position. I think the example was written for an older GoPiGo and the weires need not be swapped for the newer GoPiGo.
Do let us know if this helps.