41 const uint32_t trig_pin;
46 const uint32_t echo_pin;
58 bool scan_for_uts_tic ();
65 inline bool send_trig () {
return send_trig(
true); }
75 static volatile unsigned long prev_echo_micros;
80 static const uint32_t MIN_UTS_QUERY_SEPARATION_MICROS;
bool actual_begin()
Activates this ultrasonic sensor.
uint32_t get_echo_pin()
Gets the echo pin connected to this ultrasonic sensor.
Definition Uts_gpio.h:110
uint8_t get_port()
Gets the port connected to this ultrasonic sensor.
Definition Uts_gpio.h:96
bool send_trig(bool wait_min_separation)
Triggers a new measurement if the previous measurement has ended.
Uts_gpio(const uint8_t init_port)
Creates a new Uts_gpio object.
virtual uint16_t read_dist_mm()
Reads the distance between this ultrasonic sensor and the obstacle in front of it.
uint32_t get_trig_pin()
Gets the trigger pin connected to this ultrasonic sensor.
Definition Uts_gpio.h:103
void actual_end()
Deactivates this ultrasonic sensor.
virtual bool begin()
Activates this ultrasonic sensor.
virtual void end()
Deactivates this ultrasonic sensor.
Ultrasonic Sensor Driver (TRIG-ECHO Input-Capture) for XRCU.
Definition Uts_tic.h:25
Uts_togglable()
Constructor for a togglable ultrasonic sensor driver.