Shop OBEX P1 Docs P2 Docs Learn Events
Ping ultrasonic finder !!! — Parallax Forums

Ping ultrasonic finder !!!

TunisianoTunisiano Posts: 6
edited 2010-02-28 15:12 in Accessories
Hi everyone, am working on Ping Ultrasonic finder in my hexcrawler. I got a code which gives the distance of an object from the the Ping ultrasonic finder. Surprisingly, that code works only if the button of the board of education is put in position 1, the window shows "000" if the button is put in position 2. I tried to put that program in a larger code that makes the hexcrawler reacts depending on the distance of the closest object (for example if the distance is less than 20cm, the hexcrawler moves backward, otherwise it moves forward), the hexcrawler doesn't want to move anymore.
Please tell me how can I fix this. I read about the commands used for the Ping finder (PULSIN and PULSOUT), and nothing seems weird about them.
thanks.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-02-14 15:14
    It's impossible to answer your question without more information. At the very least, you need to supply the source code of your program and a schematic showing how you have things hooked up, both provided as attachments to a message (use the Post Reply button to get the Attachment Manager). Do check your power source. Very commonly this is a power problem where the extra load of the motors causes it to appear.
  • TunisianoTunisiano Posts: 6
    edited 2010-02-16 11:40
    It went well when I changed the connection of the Ping ultrasonic finder to Pin12, it was connected to Pin15, I don't really understand what was the problem.
    Thank you so much for your reply, I really apreciate that.
  • JReedJReed Posts: 4
    edited 2010-02-28 15:12
    I think I know what the problem is because I ran into the same thing with my boe bot. Pins 12 - 15 have the the motors attached to them. The servo plugs at the top are nice and handy, but i keep forgetting that they are tied to those pins. I had the ir sensors hooked up to pin 15 and 15 and couldn't figure out why his left eye wasn't working.
Sign In or Register to comment.