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.
 
 

37 lines
828 B

#ifndef SENSOR_BMP180_H
#define SENSOR_BMP180_H
#include "sensordata.h"
#include <Homie.h>
#include <Adafruit_BMP085.h>
class Sensor_BMP180
{
private:
Adafruit_BMP085 *bmp180;
HomieNode *sensorNode; //reference to HomieNode
struct sensordata data_temperature; //struct values are changed in setup()
struct sensordata data_pressure; //struct values are changed in setup()
bool init_ok;
public:
Sensor_BMP180();
void loop_BMP180_temperature();
void loop_BMP180_pressure();
void init();
void setSettings_Temperature(float minchange, unsigned long senddelaymax, unsigned long readdelay);
void setSettings_Pressure(float minchange, unsigned long senddelaymax, unsigned long readdelay);
void advertise(HomieNode& p_sensorNode);
void sensorloop();
};
#endif