13#include "pico/stdlib.h"
HCSR04(uint trig_pin, uint echo_pin)
Construct a new hc sr04 object.
Definition hc_sr04.cpp:6
void trig()
send a trig signal to HCSR04
Definition hc_sr04.cpp:17
uint trig_pin
the GPIO pin that send trigger signal to the HC-SR04 module
Definition hc_sr04.h:23
uint echo_pin
the GPIO pin where the HC-SR04 return echo signal
Definition hc_sr04.h:25
float get_distance()
request a measure from HCSR04
Definition hc_sr04.cpp:24