Ahh - you're calling the function once, and then asking Espruino to call the function again with E.on('init',. I don't think that's really a bug.
As you're executing the file from flash, you might as well just remove the E.on('init', startApp); line, since when your app starts is run it's going to call startApp(); anyway.
E.on('init', and the onInit function are really there for other Espruino devices where you can develop the app in RAM and then type save() to effectively 'hibernate' your app to flash memory. Then when your app 'wakes' the E.on('init' gets called - but that's not something we do on Bangle.js. There's a bit of info on that at https://www.espruino.com/Saving
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.
Ahh - you're calling the function once, and then asking Espruino to call the function again with
E.on('init',
. I don't think that's really a bug.As you're executing the file from flash, you might as well just remove the
E.on('init', startApp);
line, since when your app starts is run it's going to callstartApp();
anyway.E.on('init',
and theonInit
function are really there for other Espruino devices where you can develop the app in RAM and then typesave()
to effectively 'hibernate' your app to flash memory. Then when your app 'wakes' theE.on('init'
gets called - but that's not something we do on Bangle.js. There's a bit of info on that at https://www.espruino.com/Saving