Shop OBEX P1 Docs P2 Docs Learn Events
Ultrasonic Distance Sensor with Dragon12-Plus-USB — Parallax Forums

Ultrasonic Distance Sensor with Dragon12-Plus-USB

niteshnitesh Posts: 2
edited 2011-04-26 13:00 in General Discussion
Hello all,

I'm working on Adaptive Cruise Control using Fuzzy Logic project and I m trying to use Ultrasonic Distance Sensor to measure the distance of an object and compute the motor speed using the Fuzzy Logic.

Whole project works using IR Sensor but this IR sensors are very jumpy when room light goes up and down or shadow passes thru... So I decided to switch to Parallax Ultrasonic Distance Sensor.

How can I implement C Code for Parallax Ultrasonic Distance Sensor on Dragon12-Plus-USB board? As per Parallax Ultrasonic Distance Sensor datasheet I have to generate 5 usec pulse and then get the data...

Anyone implement Parallax Ultrasonic Distance Sensor using Dragon12-Plus board?

Thanking in advance...

Cheers,
Nitesh

Comments

  • niteshnitesh Posts: 2
    edited 2011-04-26 12:45
    Hello all,

    Please any one can help me with this problem? I will really appreciate it...

    Cheers,
    Nitesh
  • Mike GreenMike Green Posts: 23,101
    edited 2011-04-26 13:00
    I don't think you'll find anyone here who has used (or even has knowledge of) a Dragon12-Plus-USB board. The PING is pretty easy to use as you may have seen from its documentation. It uses a single I/O line. You put a positive going pulse on that line for a couple of microseconds, then wait for the leading edge of a pulse from the PING. At that point you begin timing the width of that pulse and stop at the trailing edge. The width of the pulse tells you the distance to the nearest object. That's it. There's sample code available for Parallax's processors, the Basic Stamps and the Propeller. If you go to the Arduino website, you can find sample code for the Arduino.
Sign In or Register to comment.