Query related to my IoT project

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…

  1. add the SimpleTimer library
  2. create a SimpleTimer object
  3. move the code minus teg delay, which isn’t needed now) into a function
  4. add a setInterval timer in your void setup, which will call your function every 1000ms
  5. add timer.run(); to your void loop
  6. test the code to make sure it works
  7. post your updated sketch here.

Pete.

1 Like