Thanks - that's perfect - I sometimes have difficulty getting used to the event-based programming paradigm. This version is much more responsive with respect to widgets and buttons as you can see from the screenshot below - the ANCS widget now gets time to connect properly. The app now computes a generation in 16 slots with each slot being 60ms which includes idle time in each slot. You can see the overall time is approx 960ms.
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.
Thanks - that's perfect - I sometimes have difficulty getting used to the event-based programming paradigm. This version is much more responsive with respect to widgets and buttons as you can see from the screenshot below - the ANCS widget now gets time to connect properly. The app now computes a generation in 16 slots with each slot being 60ms which includes idle time in each slot. You can see the overall time is approx 960ms.