• this is what I use now:

    // global vars
    var release = false;
    ......
    // functions, classes .....
    ......
    // this will be called on power up, if code was saved
    onInit(){ ... }
    
    if (release) {
          // save code to flash, to make code permanent
          setTimeout(save,1E3); 
    } else {
          // or just start onInit, typical way if you are still developing and testing
          setTimeout(onInit,1E3); 
    }
    
    

    Edit: added missing curly bracket open in line 12

About

Avatar for MaBe @MaBe started