Closed pvint closed 3 years ago
Original comment by Xose Pérez (Bitbucket: [Xose Pérez](https://bitbucket.org/Xose Pérez), ).
Try to exit the onSetState
callback as soon as possible. Your blink
method takes 5 full seconds and it's a blocking call. Instead, set a flag in the callback and do the blinking from the main loop. But still, you will have to rewrite the blink
method so it's not blocking, check the example code for a blink without delay in the Arduino site (https://www.arduino.cc/en/tutorial/BlinkWithoutDelay).
Original report by Lucas Schirmer (lucs) (Bitbucket: [L S](https://bitbucket.org/L S), ).
I tried to run a simple blink function in the standard example. Device detection runs demo, unfortunately the LED is just switching on and not running the whole blink function. Any idea what I'm doing wrong?