RoboJDETM v2.0

Class ParallaxPing

  extended by com.ridgesoft.robotics.SonarRangeFinder
      extended by com.ridgesoft.robotics.sensors.ParallaxPing
All Implemented Interfaces:

public class ParallaxPing
extends SonarRangeFinder

Class to interface with the Parallax Ping))) ultrasonic range finder.

Constructor Summary
ParallaxPing(PulseInput signal)
          Constructs a ParallaxPing object.
Method Summary
 int getEchoDelay()
          Gets the echo delay.
 void ping()
          Generates a ping.
Methods inherited from class com.ridgesoft.robotics.SonarRangeFinder
getDistanceCm, getDistanceInches
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait

Constructor Detail


public ParallaxPing(PulseInput signal)
Constructs a ParallaxPing object.

signal - A digital input port that supports both the PulseInput and PulseOutput interfaces.
Method Detail


public int getEchoDelay()
Gets the echo delay.

Specified by:
getEchoDelay in class SonarRangeFinder
delay time until the echo of the ping is heard in microseconds -1 if pulse not complete or no pulse


public void ping()
Generates a ping.

Note: At its longest range, the sensor will take approximately 20 milliseconds to take a range measurement. Therefore, this method should not be called more frequently than every 25 milliseconds or so.

Specified by:
ping in interface RangeFinder
Specified by:
ping in class SonarRangeFinder

RoboJDETM v2.0

Copyright (c) 2003-2009 RidgeSoft, LLC. All rights reserved.