The delay during init is really so it can do a disconnect -- and hence do the set* calls without queueing -- without interfering with the upload loop. I've found that if onInit immediately disconnects, it can confuse the IDE.
I've run out of batteries for the pucks right now -- I've been away from home this weekend -- but I think the code works fine until sleep and wake get involved. After that, it's all a bit unpredictable. Now I've got a barebones implementation, I'll try to add them back in.
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 delay during
init
is really so it can do a disconnect -- and hence do theset*
calls without queueing -- without interfering with the upload loop. I've found that ifonInit
immediately disconnects, it can confuse the IDE.I've run out of batteries for the pucks right now -- I've been away from home this weekend -- but I think the code works fine until
sleep
andwake
get involved. After that, it's all a bit unpredictable. Now I've got a barebones implementation, I'll try to add them back in.