Okay, first step is to make that void loop Blynk friendly by using a SimpleTimer to clean the loop up and remove the need for the delay() command.
Take a read of this…
and…
- add the SimpleTimer library
- create a SimpleTimer object
- move the code minus teg delay, which isn’t needed now) into a function
- add a setInterval timer in your void setup, which will call your function every 1000ms
- add
timer.run();
to your void loop
- test the code to make sure it works
- post your updated sketch here.
Pete.
1 Like