Different setInterval #3702
Replies: 2 comments
-
Posted at 2021-04-03 by Robin Sat 2021.04.03
Yes
Unsure of intention here ref 'all 10'
Missing logic for LED control and the 'tried it' code block
More Info: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2021-04-04 by @MaBecker @psc1988 have o look at this led sample https://www.espruino.com/Flashing+Lights it is also possible to use toggle() https://www.espruino.com/Reference#l_Pin_toggle there are more samples in the forum - use seach in section conversation. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2021-04-03 by psc1988
Is it possible to set different intervals?
I have two operations using setInterval().
One is to read out a sensor via I²C and on the other hand I would like to let a LED blink, depents on the counter value, e. g. counter == 3 >>> LED should blink 3 times all 10 seconds.
My problem is that the LED blinks continiously - I tried it with arguments but it does not work.
Beta Was this translation helpful? Give feedback.
All reactions