The whole interrupt thing is a bit confusing - but if you got the idea from the website, let me know where and I'll try and reword it... setWatch has existed since the very start of Espruino.
Basically: You can't run JavaScript in an interrupt. But that doesn't stop the interpreter itself from using interrupts. When you use setWatch, the interpreter itself uses interrupts to accurately timestamp the event - which is then executed when the current bit of JavaScript finishes.
For stuff like .itr - does that do something that .forEach doesn't?
The multiple button thing is a great idea! It'd make a really cool module. Perhaps you could go properly morse code and change "SS" and "LL" to ".." and "--" :)
I didn't notice a syntax highlighting issue... Could you post a screenshot?
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.
The whole interrupt thing is a bit confusing - but if you got the idea from the website, let me know where and I'll try and reword it...
setWatch
has existed since the very start of Espruino.Basically: You can't run JavaScript in an interrupt. But that doesn't stop the interpreter itself from using interrupts. When you use setWatch, the interpreter itself uses interrupts to accurately timestamp the event - which is then executed when the current bit of JavaScript finishes.
For stuff like
.itr
- does that do something that.forEach
doesn't?The multiple button thing is a great idea! It'd make a really cool module. Perhaps you could go properly morse code and change
"SS"
and"LL"
to".."
and"--"
:)I didn't notice a syntax highlighting issue... Could you post a screenshot?