|
grove (TTC03 Thermistor) Temperature sensor class
Spaniakos - grove (TTC03 Thermistor) Temperature sensor class
|
#include <TempSensor.h>
Public Member Functions | |
| TempSensor (uint8_t pin, float Thres) | |
| TempSensor (uint8_t pin) | |
| void | begin (void) |
| void | Read_Temperature (void) |
| float | Sensor_to_Temp (void) |
| void | Save_Old (void) |
| int | cmp_values (void) |
| float | Value (void) |
| float | Old_Value (void) |
| void | CalcRensor () |
| float | get_Rensor () |
| float | get_Threshold () |
| void | calibrate () |
Private Attributes | |
| uint8_t | pinTemp |
| float | temperature |
| unsigned int | sensorValue |
| float | Old_temperature |
| float | Rensor |
| float | TempeThres |
| TempSensor::TempSensor | ( | uint8_t | pin, |
| float | Thres | ||
| ) |
class constructor.
| pin | uint8_t Number of the pin to be used for reading |
| Thres | float value of the threshold that will be used |
| TempSensor::TempSensor | ( | uint8_t | pin | ) |
class constructor.
Threasold initializes to 0,10.
| pin | uint8_t Number of the pin to be used for reading |
| void TempSensor::begin | ( | void | ) |
Initialized the base grove class with the balues given in the constructor.
| void TempSensor::Read_Temperature | ( | void | ) |
reads value from sensor. the value is saved to sensorValue
| float TempSensor::Sensor_to_Temp | ( | void | ) |
Reads the Value from the pin using
Calculates the Rensor using
end Saves the temperature value.
| void TempSensor::Save_Old | ( | void | ) |
set Old_temperature equal to current temperature.
| int TempSensor::cmp_values | ( | void | ) |
compare temperature and OLD_temperature values.
| float TempSensor::Value | ( | void | ) |
Gets the Temperature valule.
| float TempSensor::Old_Value | ( | void | ) |
get the Old_temperature value.
| void TempSensor::CalcRensor | ( | ) |
Calculate the Rensor. The value is saved inside the class.
| float TempSensor::get_Rensor | ( | ) |
GETS the Rensor value.
| float TempSensor::get_Threshold | ( | ) |
Gets the Threshold.
| void TempSensor::calibrate | ( | ) |
calibrate the sensor and readings. Does initial readings in order to calibrate the sensor.
|
private |
holds the Pin number of the board
|
private |
holds the temperature value after the convertion from te reading
|
private |
holds the reading value from the sensor
|
private |
holds the old temperature value, mainly used from cmp_values
|
private |
holds the rensor value
|
private |
hold the Threshold, mainly used from cmp_values
1.8.9.1