|
PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
|
Go to the documentation of this file.
62 : m_trigger(signalMask),
73 : m_trigger(triggerMask),
129 this->m_trigger.
set();
131 this->m_trigger.
clear();
134 waitpeq(this->m_echo.get_mask(), this->m_echo.get_mask());
135 const uint32_t start =
CNT;
136 waitpne(this->m_echo.get_mask(), this->m_echo.get_mask());
Ping(const PropWare::Pin::Mask signalMask)
Construct an instance for a 3-pin variant such as the Parallax PING))) sensor.
void set_dir_out() const
Set the port for output.
unsigned int get_microseconds() const
Time measured in microseconds for a sound wave to travel from the sensor to an object and back.
#define waitpeq(state, mask)
Wait until INA equal state & mask.
Ultrasonic distance sensor such as the Parallax PING)))
unsigned int get_inches() const
Detect distance as measured in inches between sensor and object.
unsigned int get_millimeters() const
Detect distance as measured in millimeters between sensor and object.
void set_dir_in() const
Set the port for input.
Utility class to handle general purpose I/O pins.
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....
Ping(const PropWare::Pin::Mask triggerMask, const PropWare::Pin::Mask echoMask)
Construct an instance for a 4-pin variant, commonly found on eBay.
unsigned int get_centimeters() const
Detect distance as measured in centimeters between sensor and object.
void set() const
Set selected output port high (set all pins to 1)
#define waitcnt(a)
Wait until system counter reaches a value.
#define CNT
The system clock count.
#define waitpne(state, mask)
Wait until INA not equal state & mask.
Generic definitions and functions for the Parallax Propeller.
void clear() const
Clear selected output port (set it to 0)