@PeteKnight first of all, thank you for your help, i now understand the mathematic issue of the code ![]()
i put it above void setup.
BLYNK_CONNECTED()
{
Blynk.syncVirtual(V6); //AirflowDuration
Blynk.syncVirtual(V7); //AirflowDelay
timer.setInterval((airflowdelay*1000L)+(airflowduration*1000L), Airflow);
}
void setup()
{
I also changed the declartion from long to int
I changed it now to:
send sensor data to the esp every 20 seconds,
recieve data from the cloud ervery 60 seconds,
send the sensor data from the esp to the cloud every 20 seconds.
BlynkEdgent.begin(); //runs Blynk Connection Liberary
timer.setInterval(10*1000L, CCS811); //runs void CCS811 every X*1000ms
delay(200);
timer.setInterval(10*1000L, sensorDataRecive); //runs void sensorDataRecive every X*1000ms
delay(200);
timer.setInterval(10*1000L, sensorDataSend); //runs void sensorDataSend every X*1000ms
I still get into a reboot loop ![]()
I found something out:
int airflowduration =5 ;
int airflowdelay = 5 ;
if I go for this one, it starts fine, but the int airflowduration and airflowdelay won’t change, even after cloud handshake. So they stay at value 5 and 5 instead of syced values, 27 and 16. In they serial motior they get right displayed:
"Serial Montitor"
19:24:55.257 -> Airflow - duration: 27sec
19:24:55.342 -> Airflow - delay: 16min
When I try the code without an value for the int, it keeps rebooting. This does make sense to me, becuase their is no value, equals its 0, equals reebot. Did I understand that right?
int airflowduration;
int airflowdelay;



