I've got a function wrapped in a setInterval that does analogRead every 400 ms (as a presence detector). Sometimes it seams to stall for a couple of 100 ms. Because the time periods involved are very short it is hard to get to the root cause by experimenting.
Now I'm wondering if setInterval execution is blocked while
a) console data is received (programmatically, ~200 bytes at once)
b) the received string is evaluated
c) the result string (~200 bytes) is printed out
Where exactly can I read up about the timing of code execution?
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I've got a function wrapped in a setInterval that does analogRead every 400 ms (as a presence detector). Sometimes it seams to stall for a couple of 100 ms. Because the time periods involved are very short it is hard to get to the root cause by experimenting.
Now I'm wondering if setInterval execution is blocked while
a) console data is received (programmatically, ~200 bytes at once)
b) the received string is evaluated
c) the result string (~200 bytes) is printed out
Where exactly can I read up about the timing of code execution?