|
Sming Framework API
Sming - Open Source framework for high efficiency WiFi SoC ESP8266 native development with C++ language.
|
This class implements access to the DS18x20 range of temperature sensors. More...
#include <ds18s20.h>
Public Member Functions | |
| DS18S20 () | |
| Instantiate a DS18S20 object. More... | |
| void | Init (uint8_t) |
| Initiate communication on 1-wire bus. More... | |
| void | StartMeasure () |
| Start measurement of all connected sensors. More... | |
| void | RegisterEndCallback (DS18S20CompletedDelegate) |
| Register the callback function that is run when measurement is complete. More... | |
| void | UnRegisterCallback () |
| Unregister the callback function to avoid activity after measurement is complete. More... | |
| float | GetCelsius (uint8_t) |
| Get the value of the last measurment from a sensor. More... | |
| float | GetFahrenheit (uint8_t) |
| Get the value of the last measurment from a sensor. More... | |
| bool | IsValidTemperature (uint8_t) |
| Check if the last measurement for a sensor is valid. More... | |
| bool | MeasureStatus () |
| Check if measurement is in progress. More... | |
| uint64_t | GetSensorID (uint8_t) |
| Get the ID (1-wire address) of a sensor. More... | |
| uint8_t | GetSensorsCount () |
| Get the quantity of sensors detected during last measurement. More... | |
This class implements access to the DS18x20 range of temperature sensors.
| DS18S20::DS18S20 | ( | ) |
Instantiate a DS18S20 object.
| float DS18S20::GetCelsius | ( | uint8_t | ) |
Get the value of the last measurment from a sensor.
| Index | of sensor to retrieve value from |
| float DS18S20::GetFahrenheit | ( | uint8_t | ) |
Get the value of the last measurment from a sensor.
| Index | of sensor to retrieve value from |
| uint64_t DS18S20::GetSensorID | ( | uint8_t | ) |
Get the ID (1-wire address) of a sensor.
| Index | of sensor |
| uint8_t DS18S20::GetSensorsCount | ( | ) |
Get the quantity of sensors detected during last measurement.
| void DS18S20::Init | ( | uint8_t | ) |
Initiate communication on 1-wire bus.
| GPIO | pin acting as 1-wire bus |
| bool DS18S20::IsValidTemperature | ( | uint8_t | ) |
Check if the last measurement for a sensor is valid.
| Index | of sensor to check |
| bool DS18S20::MeasureStatus | ( | ) |
Check if measurement is in progress.
| void DS18S20::RegisterEndCallback | ( | DS18S20CompletedDelegate | ) |
Register the callback function that is run when measurement is complete.
| Name | of the callback function |
| void DS18S20::StartMeasure | ( | ) |
Start measurement of all connected sensors.
| void DS18S20::UnRegisterCallback | ( | ) |
Unregister the callback function to avoid activity after measurement is complete.