This commit is contained in:
Dmitry Borisenko
2021-10-05 19:21:52 +08:00
parent 74c31e30ea
commit 421f3fcb9a
348 changed files with 22008 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
#ifdef EnableSensorDht
#pragma once
#include <Arduino.h>
#include <DHTesp.h>
#include "Global.h"
#include "GyverFilters.h"
class SensorDht;
typedef std::vector<SensorDht> MySensorDhtVector;
struct paramsDht {
String type;
String key;
unsigned long interval;
unsigned int pin;
float c;
};
class SensorDht {
public:
SensorDht(const paramsDht& paramsTmp, const paramsDht& paramsHum);
~SensorDht();
DHTesp* dht;
void loop();
void readTmpHum();
private:
paramsDht _paramsTmp;
paramsDht _paramsHum;
unsigned long prevMillis;
unsigned long difference;
};
extern MySensorDhtVector* mySensorDht;
extern void dhtSensor();
#endif