first commit

This commit is contained in:
lumijiez
2025-04-28 18:30:29 +03:00
commit a4b88564a4
45 changed files with 2188 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
#ifndef DHT_CONTROLLER_H
#define DHT_CONTROLLER_H
#include <Arduino.h>
#include <DHT.h>
class DHTController {
private:
DHT _dht;
unsigned long _lastReadTime;
unsigned long _minReadInterval;
float _lastTemperature;
float _lastHumidity;
bool _lastReadSuccess;
public:
DHTController(uint8_t pin, uint8_t type = DHT11);
void begin();
bool read();
float getTemperature();
float getHumidity();
bool isLastReadSuccessful() const;
void setMinReadInterval(unsigned long interval);
};
#endif