mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 06:32:19 +03:00
first
This commit is contained in:
40
include/items/vSensorDht.h
Normal file
40
include/items/vSensorDht.h
Normal file
@@ -0,0 +1,40 @@
|
||||
#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();
|
||||
Reference in New Issue
Block a user