Running Espruino program outside of the IDE

Posted on
  • When you unplug the Espruino device from the USB port does it wipe it's program? I'm trying to get the program to run after plugging it into the USB and not running it through the IDE. I haven't had any success, once I unplug it it doesn't run my program when it gets power again. How do I go about doing that?

  • Hi. All you have to do is type save() on the left-hand side. It'll save the state of everything (including intervals and watches) into flash.

    If you want to run code on startup, create a function called onInit - After saving, Espruino will call it automatically at power on.

    Hope that helps!

  • That's easier than I thought, thank you! And thank you for being so responsive! :)

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Running Espruino program outside of the IDE

Posted by Avatar for mikeytdan @mikeytdan

Actions