truhensteuerung/Truhe.h
Simon Zeyer 263b9a1a56 Change DHT Sensor to DS18B20
The Sensors have a unique ID and can be used in a bus configuration on one
gpo pin,
but we are using one pin/bus per sensor and only read the first sensor
on a bus to be able to change the sensors later without changing the code.
2022-07-04 21:52:50 +02:00

26 lines
521 B
C++

#include <OneWire.h>
#include <DallasTemperature.h>
class Truhe {
private:
OneWire _oneWire;
DallasTemperature _sensors;
int _relay;
uint8_t _sensorpin;
int _stat = -1;
float _cur_temp = 0;
int _updlcd = 0;
String _name = "";
public:
Truhe(String, int, uint8_t);
void setup();
void mess();
void schalt(int, int);
int getUpdLcd();
void setUpdLcd(int);
int getRelay();
int getSensorPin();
int getStat();
int getCurTemp();
String getName();
};