C++ DevKit
C++ set of OOP library
Loading...
Searching...
No Matches
hc_sr04.h
Go to the documentation of this file.
1
11
#pragma once
12
13
#include "pico/stdlib.h"
14
19
class
HC_SR04
20
{
21
private
:
23
uint trig_pin;
25
uint echo_pin;
27
void
trig();
28
29
public
:
36
HC_SR04
(uint trig_pin, uint echo_pin);
42
float
get_distance
();
43
};
44
HC_SR04::HC_SR04
HC_SR04(uint trig_pin, uint echo_pin)
Construct a new hc sr04 object.
Definition
hc_sr04.cpp:6
HC_SR04::get_distance
float get_distance()
request a measure from HC_SR04
Definition
hc_sr04.cpp:24
src
device
HC_SR04
hc_sr04.h
Generated by
1.13.1