I just got my PING))) module yesterday and had the same exact problem. Tried the code offered above in this thread and the PING))) worked great. Then I looked back through the "Roaming with PING v1.0" code and found a problem:
- The PING))) code says that you must already have your BOE-bot set up for roaming with IR sensors as given in the Robotics with the BOE bot text book.
- The Robotics with the BOE-bot text (I have version 1.5) has you install the IR LEDS as pins 1 and 7
- The "Roaming with PING))) v1.0" code has the IR sensors at pins 2 and 8. Doh!
Once I realised this, I changed those two parts of the code and it worked ok. If you set your BOE-bot up just like the "Robtics..." text then you should also change the speaker pin to 2 (I think it was at 4 in the PING))) code). Give that a try and see if it helps your problem too.
The version 2.2 code was where I based the Roaming with IR code from.· It is using the same I/O pins.· In any event Ryan and Dave posted some code which doesn't use the IR Sensors...You could try it.
Comments
1. check your batteries - try fresh new ones
2. check your wiring
3. check your wiring
4. check your wiring
...you may also want to check your wiring
Ryan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ryan Clarke
Parallax Tech Support
RClarke@Parallax.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
- The PING))) code says that you must already have your BOE-bot set up for roaming with IR sensors as given in the Robotics with the BOE bot text book.
- The Robotics with the BOE-bot text (I have version 1.5) has you install the IR LEDS as pins 1 and 7
- The "Roaming with PING))) v1.0" code has the IR sensors at pins 2 and 8. Doh!
Once I realised this, I changed those two parts of the code and it worked ok. If you set your BOE-bot up just like the "Robtics..." text then you should also change the speaker pin to 2 (I think it was at 4 in the PING))) code). Give that a try and see if it helps your problem too.
http://forums.parallax.com/showthread.php?p=576931
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com