You are reading a single comment by @noofny and its replies. Click here to read the full conversation.
  • Well dang, I hang my head in shame for not checking the troubleshooting guide first.

    This answered my problem;
    http://www.espruino.com/Troubleshooting
    "If you want to execute certain commands at power-on, add one or more event handlers for the init event on E:"

    E.on('init', function() {
      // ...
    });
    

    "This will then be loaded every time Espruino starts up. If you create a function called onInit, that will be executed too:"

    function onInit() {
     // ...
    }
    

    So what is misleading is that if you click the "Send to Espruino" button in the WebIDE and DON'T have your startup code inside OnInit(), it runs fine, but if you DO then it doesn't run until you call save(). I'm sure there's an explanation to this somewhere.

About

Avatar for noofny @noofny started