thermometer stuff

This commit is contained in:
Wolfgang Hottgenroth
2014-11-17 19:17:09 +01:00
parent b426dbd570
commit 33a8a35bf8
5 changed files with 52 additions and 11 deletions

View File

@ -8,21 +8,20 @@ namespace nsThermometer {
const float R_REF = 3000.0;
const float PT1000_R0 = 1000.0;
const float PT1000_Coeff = 3.85e-3;
const float ALPHA = 0.1;
const float CYCLE_TIME = 1000; // ms
};
class Thermometer {
public:
Thermometer();
void begin();
void begin(int eepromAddr);
void exec(float r);
float temperature;
float temperatureRaw;
private:
int m_eepromAddr;
float m_lastSmoothedTemperature;
float m_smoothedTemperature;
float m_alpha;
};
#endif // _THERMOMETER_H_