JM9 XRCU Board 0.1.3a
Libraries API Reference
Loading...
Searching...
No Matches
Uts_us016.h
Go to the documentation of this file.
1
8
9#ifndef UTS_US016_H
10#define UTS_US016_H
11
12#include <Arduino.h>
13#include <Ain.h>
14#include <Uts_general.h>
15
23class Uts_us016 : public Uts_general {
24 private:
28 const uint8_t ain_channel;
29
33 bool range_pin_is_vcc;
34
38 static const bool DEFAULT_RANGE_PIN_IS_VCC;
39
40 public:
46 Uts_us016 (const uint8_t init_ain_channel);
47
53 void set_range_pin_voltage_level (const bool is_vcc = DEFAULT_RANGE_PIN_IS_VCC);
54
60 uint16_t read_dist_mm ();
61};
62
63#endif // #ifndef UTS_US016_H
Uts_general()
Constructor for a generic ultrasonic sensor driver.
Definition Uts_general.cpp:8
Uts_us016(const uint8_t init_ain_channel)
Creates a new Uts_us016 object.
Definition Uts_us016.cpp:10
uint16_t read_dist_mm()
Reads the distance between this ultrasonic sensor and the obstacle in front of it.
Definition Uts_us016.cpp:22
void set_range_pin_voltage_level(const bool is_vcc=DEFAULT_RANGE_PIN_IS_VCC)
Sets whether the Range pin on this ultrasonic sensor is connected to VCC or GND.
Definition Uts_us016.cpp:18