Are you connecting through Bluetooth, or USB Serial?
Can you also maybe try removing the setupExternalHardware() call that's in the global scope? With it, it gets called when you upload - but then when you save you save the current state (including whatever state of initialisation it was at), but then setupExternalHardware() gets called again from onInit() - it's possible that is causing you problems.
© Espruino, powered by microcosm.
Report a problem