combined sourcode for mostly esp8266 sensor iot nodes.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

39 lines
847 B

#ifndef SENSOR_HTU21D_H
#define SENSOR_HTU21D_H
#include "sensordata.h"
#include <Homie.h>
#include <Wire.h>
#include <Adafruit_HTU21DF.h>
class Sensor_HTU21D
{
private:
Adafruit_HTU21DF *htu;
HomieNode *sensorNode; //reference to HomieNode
struct sensordata data_temperature; //struct values are changed in setup()
struct sensordata data_humidity; //struct values are changed in setup()
bool init_ok;
public:
Sensor_HTU21D();
void loop_HTU21D_temperature();
void loop_HTU21D_humidity();
void init();
void setSettings_Temperature(float minchange, unsigned long senddelaymax, unsigned long readdelay);
void setSettings_Humidity(float minchange, unsigned long senddelaymax, unsigned long readdelay);
void advertise(HomieNode& p_sensorNode);
void sensorloop();
};
#endif