Shop OBEX P1 Docs P2 Docs Learn Events
Hey I have a PING))) Ultrasonic Sensor for my robot... — Parallax Forums

Hey I have a PING))) Ultrasonic Sensor for my robot...

Anton22Anton22 Posts: 2
edited 2010-05-04 15:38 in Accessories
Hi, I have a ultrasonic sensor for basic stamp. I was just wondering how would you program it to detect some object·and run a servo motor with it. Please help..Thank you for your time..

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-04-29 04:00
    Go to the Parallax webstore page for the PING))). You'll see several links to documentation and sample programs. Download and read them. You'll find examples for object detection and even "Roaming with PING" which is a program for a BoeBot that makes the BoeBot explore a room with obstacles in it using the PING))).
  • Anton22Anton22 Posts: 2
    edited 2010-04-29 05:28
    I have look at the several links to documentation and sample programs. I have a parallax basic stamp with Lcd, ultrasonic sensor PING))), two servo one left and one right side and finnally a speaker.
    It like a boe bot just without the rotational servo connect to the PING))). I still haven't got it to do roaming.
  • Spiral_72Spiral_72 Posts: 791
    edited 2010-05-04 15:25
    No rotational servo? Hmmm. The Ping reports distance and that's it. I suppose you could drive both servos until the ping finds an object 10cm ahead (for example). At that point you could turn right for a short time, then drive forward again. Just an idea....

    As far as code I'm not sure anyone will write it for you, however it would be based on Parallax code you can download for the Ping, the servo, and the FREQOUT command for whatever you want the speaker to report.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "puff"...... Smile, there went another one.
  • Mike GreenMike Green Posts: 23,101
    edited 2010-05-04 15:38
    You will have to start with the existing sample programs and modify them to do what you want. As Spiral_72 noted, you can turn the whole robot to scan the environment with the PING))) rather than using the PING))) servo.
Sign In or Register to comment.