r, u, t
This commit is contained in:
28
Thermometer.h
Normal file
28
Thermometer.h
Normal file
@ -0,0 +1,28 @@
|
||||
#ifndef _THERMOMETER_H_
|
||||
#define _THERMOMETER_H_
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <stdint.h>
|
||||
|
||||
namespace {
|
||||
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 exec(float r);
|
||||
float temperature;
|
||||
float temperatureRaw;
|
||||
private:
|
||||
float m_lastSmoothedTemperature;
|
||||
float m_smoothedTemperature;
|
||||
};
|
||||
|
||||
#endif // _THERMOMETER_H_
|
Reference in New Issue
Block a user