28015 Parallax Inc, 28015 Datasheet - Page 11

Optical Sensor Development Tools PING))) DISTANCE SENSOR ULTRASONIC

28015

Manufacturer Part Number
28015
Description
Optical Sensor Development Tools PING))) DISTANCE SENSOR ULTRASONIC
Manufacturer
Parallax Inc
Series
PING)))™r
Datasheet

Specifications of 28015

Operating Voltage
5 V
Operating Current
30 mA
Maximum Operating Temperature
+ 70 C
Minimum Operating Temperature
0 C
Description/function
Proximity Sensor
Sensing Distance
0.787" ~ 118.110" (20mm ~ 3m) ADJ
Sensor Type
UltraSonic
Sensing Object
Metallic and Non-Metallic
Response Frequency
40kHz
Material - Body
-
Shielding
Unshielded
Voltage - Supply
5V
Output Type
Pulse Output
Terminal Type
3-Wire
Package / Case
3-SIP
For Use With/related Products
Basic Stamp
Lead Free Status / RoHS Status
Lead free / RoHS Compliant

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
28015
Manufacturer:
PARALLA
Quantity:
20 000
}
This simple demo illustrates the use of the PING))) ultrasonic range finder class with
the Javelin Stamp:
import stamp.core.*;
import stamp.peripheral.sensor.Ping;
public class testPing {
Copyright © Parallax Inc.
/**
public int getIn() {
}
/**
public int getIn10() {
}
/*
/**
public int getCm() {
}
/**
public int getMm() {
}
public static final char HOME = 0x01;
public static void main() {
* Values to derive conversion factors are selected to prevent roll-over
* past the 15-bit positive values of Javelin Stamp integers.
*/
* @return PING))) distance value in inches
*/
* @return PING))) distance value in tenths of inches
*/
* The PING))) returns a pulse width of 29.033 uS per centimeter.
* Javelin pulseIn() round-trip echo time is in 8.68 uS units, this is the
* same as a one-way trip in 4.34 uS units.
* get a time-per-centimeter conversion factor of 6.6896.
*
* Values to derive conversion factors are selected to prevent roll-over
* past the 15-bit positive values of Javelin Stamp integers.
*/
* @return PING))) distance value in centimeters
*/
* @return PING))) distance value in millimeters
*/
return (getRaw() * 3 / 51);
return (getRaw() * 3 / 5);
return (getRaw() * 3 / 20);
return (getRaw() * 3 / 2);
Ping range = new Ping(CPU.pin0);
StringBuffer msg = new StringBuffer();
int distance;
PING))) Ultrasonic Distance Sensor (#28015)
// raw * 0.058824
// raw / 1.6667
// raw / 6.6667
// raw / 0.6667
Dividing 29.033 by 4.34 we
v1.5 2/15/2008 Page 11 of 12
As the

Related parts for 28015