finally a working modularized version
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
|
||||
class DeviceDht : public Device {
|
||||
public:
|
||||
inline DeviceDht(byte dhtPin, byte dhtType) {
|
||||
inline DeviceDht(byte dhtPin, byte dhtType):dht(dhtPin, dhtType) {
|
||||
pin = dhtPin;
|
||||
type = dhtType;
|
||||
}
|
||||
@ -17,9 +17,7 @@ class DeviceDht : public Device {
|
||||
private:
|
||||
byte pin;
|
||||
byte type;
|
||||
// TODO configuration via constructor doesn't work yet
|
||||
//DHT dht{pin, type};
|
||||
DHT dht{D4, DHT22};
|
||||
DHT dht;
|
||||
const int INTERVAL_DHT = 60;
|
||||
unsigned long lastSentDHT = 0;
|
||||
float humidity, temperature; // raw values from the sensor
|
||||
|
Reference in New Issue
Block a user