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.

18 lines
405 B

struct sensordata
unsigned long lastreadtime=0;
unsigned long readdelay=1000*10; //polling delay
float minchange=0; //send new value if difference to last sent value is greater than this
float lastsentvalue=0;
float value=0;
unsigned long lastsent=0;
unsigned long senddelaymax=1000*60*5; //maximum time until current value is send