I tried several of the code examples on the site to try to get the Parallax PING))) sensor working through the mbed mounted on my Pololu m3pi robot, but to no avail. The code hangs during the while (!pingPin) line of segment below:
Timer tmr;
pingPin.output();
pingPin = 0;
wait_us(2);
pingPin = 1;
wait_us(5);
pingPin = 0;
pingPin.input();
while (!pingPin);
tmr.start();
while (pingPin);
range = tmr.read_us();
I noticed though, that the ACT LED on the Ping sensor was never lighting up, which to me suggests it is not getting adequate power. I don't see why this would be the case though, I have the ground pin on the Ping going to GND on the mbed, 5V going to VOUT, and SIG going to p10. I tried sending the 5V to VU, but that made no difference, nor did using any other pin besides p10. I would post my full code, but I can't even seem to get it to work with the Ping library or sample code listed on the site here first.
Has anyone else had similar problems? I have yet to get anything external working on my m3pi and it's getting a bit frustrating.
On another note, for those that have used analog sensors on the m3pi, is it true that I have to desolder one of the LEDs on the m3pi in order to use any other analog sensor input?
Thanks
I tried several of the code examples on the site to try to get the Parallax PING))) sensor working through the mbed mounted on my Pololu m3pi robot, but to no avail. The code hangs during the while (!pingPin) line of segment below:
I noticed though, that the ACT LED on the Ping sensor was never lighting up, which to me suggests it is not getting adequate power. I don't see why this would be the case though, I have the ground pin on the Ping going to GND on the mbed, 5V going to VOUT, and SIG going to p10. I tried sending the 5V to VU, but that made no difference, nor did using any other pin besides p10. I would post my full code, but I can't even seem to get it to work with the Ping library or sample code listed on the site here first.
Has anyone else had similar problems? I have yet to get anything external working on my m3pi and it's getting a bit frustrating.
On another note, for those that have used analog sensors on the m3pi, is it true that I have to desolder one of the LEDs on the m3pi in order to use any other analog sensor input?
Thanks