|
C++ DevKit
C++ set of OOP library
|
class for the ultrasonic ranging module HC-SR04 More...
#include <hc_sr04.h>

Public Member Functions | |
| HCSR04 (uint trig_pin, uint echo_pin) | |
| Construct a new hc sr04 object. | |
| float | get_distance () |
| request a measure from HCSR04 | |
Private Member Functions | |
| void | trig () |
| send a trig signal to HCSR04 | |
Private Attributes | |
| uint | trig_pin |
| the GPIO pin that send trigger signal to the HC-SR04 module | |
| uint | echo_pin |
| the GPIO pin where the HC-SR04 return echo signal | |
class for the ultrasonic ranging module HC-SR04
| HCSR04::HCSR04 | ( | uint | trig_pin, |
| uint | echo_pin ) |
Construct a new hc sr04 object.
| trig_pin | the pin attached to the triggering signal |
| echo_pin | the pin used to measure round-trip time of ultrasonic pulses |
| float HCSR04::get_distance | ( | ) |
request a measure from HCSR04
