Hi Guys, could I confirm the below is valid in regards to timer use and delays within the function? or does this cause the same issues as having delays in the loop which isnt recommend?
If so, how do you control an LED blink which requires some sort of delay or do you need to use a timer for on and then off if timing intervals to make it look like it is blinking?
Basically there should not be any delay in your whole sketch. It just stops the whole code and it will cause connection problems or just crash the code. Search “Blink without delay” on google.
Yes, it does, and not only isn’t it recommended, it will make your sketch unresponsive to commands from the Blynk app and ultimately cause disconnections from the Blynk server.
My favourite way of Blinking an LED is to use the Ticker library (although if you do this, beware that Ticker uses seconds, or decimal fractions of a second as the time parameter, not milliseconds as with delay or BlynkTimer parameters.
You can achieve the same result with a BlynkTimer in timeout mode and preferably using a Lambda function, but it requires a bit more thought to be applied (I prefer the easy option).
awesome, thanks heaps for that. Dont have many delays so could just turn them into functions with Blynktimers for simplicity sake, easy logic. Will Read up as you suggested