Shop OBEX P1 Docs P2 Docs Learn Events
PING))) help — Parallax Forums

PING))) help

llomllllomll Posts: 4
edited 2008-02-14 17:49 in BASIC Stamp
Hello,

I am using the PING))) sensor with the Basic Stamp 2 in order to measure the distance of the object. I have following logic to covert the pulses into the distance:

Get_Sonar:
Ping = IsLow ' Make Trigger 0-1-0
PULSOUT Ping, Trigger ' Trigger PING)))
PULSIN Ping, IsHigh, rawDist ' Measure Echo Pulse
rawDist = rawDist */ Scale ' Convert To uS
rawDist = rawDist / 2 ' Remove Return Trip
inches = rawDist ** RawToIn ' Convert To Inches
cm = rawDist ** RawToCm ' Convert To Centimeters
RETURN

The only problem I am having is that the sensor detects maximum of 61 Inches, no more that that. That is about half of the maximum detection range.

Could someone direct me to how I can go about to fix this problem?

Sorry, I am new at this.

Thank you,

Comments

  • dandreaedandreae Posts: 1,375
    edited 2008-02-14 17:49
    Please contact tech support at support@parallax.com and include the name that the sensor was orderd under.

    Thanks,

    Dave

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dave Andreae

    Parallax Tech Support·
Sign In or Register to comment.