E707 Basic NodeMCU-V2 Shield Library
1.0
|
Base class for any temperature sensor. More...
#include <basic-nodemcuv2-shield.h>
Public Member Functions | |
float | getTemperatureC (void) |
Function to read the temperature of a temp-sensor and return it in Celcius. More... | |
float | getTemperatureF (void) |
Function to read the temperature of a temp-sensor and return it in Fahrenheit. More... | |
Protected Attributes | |
int | offset |
The voltage offset in mV from the temperature sensor. More... | |
int | divide_by |
The voltage division in mV from the temperature sensor. More... | |
Base class for any temperature sensor.
Temp sensors call up this class and change the offset and divide_by variables. This should eliminate copy-and-paste code
float _TempSensor::getTemperatureC | ( | void | ) |
Function to read the temperature of a temp-sensor and return it in Celcius.
float _TempSensor::getTemperatureF | ( | void | ) |
Function to read the temperature of a temp-sensor and return it in Fahrenheit.
|
protected |
The voltage division in mV from the temperature sensor.
This number is what the input voltage in mV is divided by after substracting offset.
|
protected |
The voltage offset in mV from the temperature sensor.
This number is substracted from the read analog input value (in mV) before dividing by divide_by.