grove (TTC03 Thermistor) Temperature sensor class
Spaniakos - grove (TTC03 Thermistor) Temperature sensor class
TempSensor.h
1 /*
2  Copyright (C) 2014 G. Spanos <spaniakos@gmail.com
3 
4  This program is free software; you can redistribute it and/or
5  modify it under the terms of the GNU General Public License
6  version 2 as published by the Free Software Foundation.
7  */
8 
15 #ifndef __TempSensor_H__
16 #define __TempSensor_H__
17 
18 #include "TempSensor_config.h"
19 
20 class TempSensor{
21  private:
22  uint8_t pinTemp;
23  float temperature;
24  unsigned int sensorValue;
26  float Rensor;
27  float TempeThres;
28  public:
35  TempSensor(uint8_t pin,float Thres);
36 
43  TempSensor(uint8_t pin);//thres inits to 0.10
44 
49  void begin(void);
50 
54  void Read_Temperature(void);
55 
62  float Sensor_to_Temp(void);
63 
67  void Save_Old(void);
68 
72  int cmp_values(void);
73 
77  float Value(void);
78 
82  float Old_Value(void);
83 
87  void CalcRensor();
88 
92  float get_Rensor();
93 
97  float get_Threshold();
98 
102  void calibrate();
103 };
104 #endif //TempSennsor
105 
void Save_Old(void)
Definition: TempSensor.cpp:52
void calibrate()
Definition: TempSensor.cpp:92
float get_Rensor()
Definition: TempSensor.cpp:84
float Old_temperature
Definition: TempSensor.h:25
float Old_Value(void)
Definition: TempSensor.cpp:73
float temperature
Definition: TempSensor.h:23
uint8_t pinTemp
Definition: TempSensor.h:22
float get_Threshold()
Definition: TempSensor.cpp:88
void CalcRensor()
Definition: TempSensor.cpp:77
Definition: TempSensor.h:20
float TempeThres
Definition: TempSensor.h:27
float Sensor_to_Temp(void)
Definition: TempSensor.cpp:43
float Rensor
Definition: TempSensor.h:26
float Value(void)
Definition: TempSensor.cpp:69
void Read_Temperature(void)
Definition: TempSensor.cpp:36
TempSensor(uint8_t pin, float Thres)
Definition: TempSensor.cpp:14
void begin(void)
Definition: TempSensor.cpp:32
int cmp_values(void)
Definition: TempSensor.cpp:59
unsigned int sensorValue
Definition: TempSensor.h:24