PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
|
Ultrasonic distance sensor such as the Parallax PING))) More...
#include <PropWare/sensor/distance/ping.h>
Public Member Functions | |
Ping (const PropWare::Pin::Mask signalMask) | |
Construct an instance for a 3-pin variant such as the Parallax PING))) sensor. More... | |
Ping (const PropWare::Pin::Mask triggerMask, const PropWare::Pin::Mask echoMask) | |
Construct an instance for a 4-pin variant, commonly found on eBay. More... | |
unsigned int | get_millimeters () const |
Detect distance as measured in millimeters between sensor and object. More... | |
unsigned int | get_centimeters () const |
Detect distance as measured in centimeters between sensor and object. More... | |
unsigned int | get_inches () const |
Detect distance as measured in inches between sensor and object. More... | |
unsigned int | get_microseconds () const |
Time measured in microseconds for a sound wave to travel from the sensor to an object and back. More... | |
unsigned int | get_clock_ticks () const |
Time measured in system clock ticks for a sound wave to travel from the sensor to an object and back. This is the most accurate method on the Ping class. More... | |
Ultrasonic distance sensor such as the Parallax PING)))
For 3-pin variants like the Parallax PING))) sensor, use the following template:
PropWare::Ping::Ping | ( | const PropWare::Pin::Mask | signalMask | ) |
PropWare::Ping::Ping | ( | const PropWare::Pin::Mask | triggerMask, |
const PropWare::Pin::Mask | echoMask | ||
) |
unsigned int PropWare::Ping::get_centimeters | ( | ) | const |
unsigned int PropWare::Ping::get_clock_ticks | ( | ) | const |
Time measured in system clock ticks for a sound wave to travel from the sensor to an object and back. This is the most accurate method on the Ping class.
Definition at line 127 of file ping.h.
unsigned int PropWare::Ping::get_inches | ( | ) | const |
unsigned int PropWare::Ping::get_microseconds | ( | ) | const |
unsigned int PropWare::Ping::get_millimeters | ( | ) | const |
Detect distance as measured in millimeters between sensor and object.
Definition at line 86 of file ping.h.