MistyGro API
C++ API for MistyGro's ESP32 controller based on the Arduino framework
|
wrapper for Dallas one-wire temperature sensor (DS18B20) More...
#include <temperature_sensor.h>
Public Member Functions | |
TemperatureSensor (int pin) | |
Construct a new TemperatureSensor. More... | |
void | begin () |
Initialise all one wire sensors. More... | |
uint8_t | device_count () |
Get count of total sensors on the one wire bus. More... | |
float | read () |
Read temperature as float value from sensor. More... | |
wrapper for Dallas one-wire temperature sensor (DS18B20)
Definition at line 30 of file temperature_sensor.h.
TemperatureSensor::TemperatureSensor | ( | int | pin | ) |
Construct a new TemperatureSensor.
pin | one wire bus pin |
Definition at line 17 of file temperature_sensor.cpp.
void TemperatureSensor::begin | ( | ) |
Initialise all one wire sensors.
Definition at line 19 of file temperature_sensor.cpp.
uint8_t TemperatureSensor::device_count | ( | ) |
Get count of total sensors on the one wire bus.
Definition at line 21 of file temperature_sensor.cpp.
float TemperatureSensor::read | ( | ) |
Read temperature as float value from sensor.
Definition at line 23 of file temperature_sensor.cpp.