C++ DevKit
C++ set of OOP library
|
class for the ultrasonic ranging module HC-SR04 More...
#include <hc_sr04.h>
Public Member Functions | |
HC_SR04 (uint trig_pin, uint echo_pin) | |
Construct a new hc sr04 object. | |
float | get_distance () |
request a measure from HC_SR04 | |
class for the ultrasonic ranging module HC-SR04
HC_SR04::HC_SR04 | ( | 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 HC_SR04::get_distance | ( | ) |
request a measure from HC_SR04