122-28029 Parallax Inc, 122-28029 Datasheet - Page 61

GUIDE STUDENT SMART SENSORS

122-28029

Manufacturer Part Number
122-28029
Description
GUIDE STUDENT SMART SENSORS
Manufacturer
Parallax Inc
Datasheet

Specifications of 122-28029

Accessory Type
Manual
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
Smart Sensors
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
Figure 2-6: Calipers with a mm/in Toggle Button
ACTIVITY #3: INCH MEASUREMENTS
Most electronic distance measuring devices offer results in either metric or English units.
For example, the calipers shown in Figure 2-6 has a button you can press to choose
between mm and inches. Other measuring devices offer yards or meters, or inches or
centimeters, etc. So that your program can display both centimeters and inches, this
activity introduces uses the multiply-high (
centimeters to inches.
An Inches ** Constant
The
speed of sound in centimeters per
every inch. So, the conversion formula from centimeter to inch distances can be written
like this:
The easiest way to convert to inches is to simply divide the value of
2.54, and use the result declared in another constant, like
constants for the
CmConstant
S
InCons
in
=
S
cm
tan
**
÷
used in
operator should be integers, so round the result to the nearest integer.
t
2.54
=
2260
cmDistance = time ** CmConstant
÷
2.54
PULSOUT
=
889.76
**
Chapter 2: The Ping))) Ultrasonic Sensor · Page 49
time unit. There are 2.54 centimeters in
) operator a second time to convert from
890
InConstant
is a measure of the
. Remember that
CmConstant
by

Related parts for 122-28029