I tried one by one but not solved. and a question: Can I add timer.setInterval to another void expect void setup ?
tried but nothing !
yes you can
As Alexis saidā¦ try first with only the sendUptime interval, if it works, try to comment out that and uncomment the PIRval, etcā¦ maybe there is something that stops the exec of the program. As my last link I posted should work with your script. You only need to set the interval for the first function, all the other should be called with setTimeoutā¦
Did you measure the execution time of your sendUptime?
he said that donāt work anymore
so I donāt understand
I checked the datasheet for the BMP180 and it takes 8 ~ 176ms to return the measurement, depending on accuracyā¦
can you write an example for me ? thanks
what happened if you delete all timers ?
if it works
try only first timer with 10000L
you donāt need to get value every seconds
10 seconds is good enough
When I delete all timers expect sendUptime there is no problem and connection restored after rebooting wifi router. But when I add function to sendUptime void or adding any timer the connection to server lost after rebooting wifi router
I donāt understand
But when I add function to sendUptime void
this function works or not?
Try this:
-comment out all timers except sendUptime in setup. Than modify that function to include sthe setTimeout:
void sendUptime() { float temperature = sensor.getCelsiusHundredths(); Blynk.virtualWrite(5, (float)temperature/100); float humidity = sensor.getHumidityPercent(); Blynk.virtualWrite(6, humidity); // virtual pin uint16_t lux = lightMeter.readLightLevel(); Blynk.virtualWrite(4, lux); float bp = bmp.readPressure(); Blynk.virtualWrite(9,(float)bp/100); int callFunction2 = timer.setTimeout(1000, PIRval);//TWO not ONE }
Not worked.
Thanks. I will test tomorrow and tell the result
so you have a problem with that sensor
Canāt be helped.
BMP180 sensor ?
OK the problem solved by setting the sendUptime timer to 3000L ! but which sensor need 3000ms to measuring the data ?
we were right!
3 seconds is very high.
anyway, that works.
yeah thanks. now working on 2000L without any problem.
anyway, you donāt need to check so many times
Donāt you?
I check my sensors 2 times hour.