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.
 
 

43 lines
1.1 KiB

#ifndef SENSOR_MULTICHANNELGASGMXXX_H
#define SENSOR_MULTICHANNELGASGMXXX_H
#include "sensordata.h"
#include <Homie.h>
#include <Multichannel_Gas_GMXXX.h>
#include <Wire.h>
class Sensor_MULTICHANNELGASGMXXX
{
private:
GAS_GMXXX<TwoWire> *gas;
HomieNode *sensorNode; //reference to HomieNode
struct sensordata data_no2; //struct values are changed in setup()
struct sensordata data_c2h5oh;
struct sensordata data_voc;
struct sensordata data_co;
bool init_ok;
public:
Sensor_MULTICHANNELGASGMXXX();
void init();
void setSettings_no2(float minchange, unsigned long senddelaymax, unsigned long readdelay);
void setSettings_c2h5oh(float minchange, unsigned long senddelaymax, unsigned long readdelay);
void setSettings_voc(float minchange, unsigned long senddelaymax, unsigned long readdelay);
void setSettings_co(float minchange, unsigned long senddelaymax, unsigned long readdelay);
void advertise(HomieNode& p_sensorNode);
void sensorloop_no2();
void sensorloop_c2h5oh();
void sensorloop_voc();
void sensorloop_co();
};
#endif