MistyGro API
C++ API for MistyGro's ESP32 controller based on the Arduino framework
Public Member Functions | List of all members
TemperatureSensor Class Reference

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...
 

Detailed Description

wrapper for Dallas one-wire temperature sensor (DS18B20)

Definition at line 30 of file temperature_sensor.h.

Constructor & Destructor Documentation

◆ TemperatureSensor()

TemperatureSensor::TemperatureSensor ( int  pin)

Construct a new TemperatureSensor.

Parameters
pinone wire bus pin

Definition at line 17 of file temperature_sensor.cpp.

Member Function Documentation

◆ begin()

void TemperatureSensor::begin ( )

Initialise all one wire sensors.

Definition at line 19 of file temperature_sensor.cpp.

◆ device_count()

uint8_t TemperatureSensor::device_count ( )

Get count of total sensors on the one wire bus.

Returns
uint8_t

Definition at line 21 of file temperature_sensor.cpp.

◆ read()

float TemperatureSensor::read ( )

Read temperature as float value from sensor.

Returns
float

Definition at line 23 of file temperature_sensor.cpp.


The documentation for this class was generated from the following files: