sensor dht support

This commit is contained in:
Dmitry Borisenko
2020-09-04 13:44:49 +03:00
parent 551b35ff4f
commit 26b5c173a2
4 changed files with 66 additions and 2 deletions

View File

@@ -0,0 +1,20 @@
#include "items/ItemsGlobal.h"
#include "items/SensorDhtClass.h"
//#ifdef SensorDhtEnabled
//=========================================Модуль ультрозвукового дальномера==================================================================
//dht-temp;id;anydata;Сенсоры;Температура;order;pin;c[1]
//=========================================================================================================================================
SensorDhtClass mySensorDht;
void DhtTemp() {
mySensorDht.update();
String key = mySensorDht.gkey();
sCmd.addCommand(key.c_str(), dhtReading);
mySensorDht.SensorDhtInit();
mySensorDht.clear();
}
void dhtReading() {
String key = sCmd.order();
mySensorDht.SensorDhtRead(key);
}
//#endif