Shop OBEX P1 Docs P2 Docs Learn Events
Ping Code Question — Parallax Forums

Ping Code Question

madigajmmadigajm Posts: 4
edited 2009-01-10 06:20 in BASIC Stamp
I am new to programming and I am wondering if anyone could help me with a small project question. I am looking for code that will allow me to tell the robot to move forward using two continuous rotation servos, and then use the Ping to monitor forward to see if there is an object. Once there is an object within 9 cm a normal servo would be activated. Can anyone help, or does anyone have any code help.

thanks

·

Comments

  • SRLMSRLM Posts: 5,045
    edited 2009-01-09 05:45
    Do a search for roving with PING for ideas, but this is a good project to start coding yourself. Look in Robotics With the BOE BOT to figure out how to make the robot move forward by controlling the servos, and look on the ping product page to figure out how to do that. Then, all you need is an if statement (IF ping detects something THEN move servo).
  • madigajmmadigajm Posts: 4
    edited 2009-01-10 06:20
    Thanks for the help. All I needed was the If statement idea. I just was drawing a blank.
Sign In or Register to comment.