Stored code not cleared after reset?

Posted on
  • Had the IDE 'Save on Upload' some code on 1.94.


    • Reset Puck.js with the button held down - the Green LED lights.
    • Keep the button pressed for ~3 seconds until all 3 LEDs are lit
    • Released the button
    • The Green LED flashes 5 times
    • Connected to IDE
      • Typed save()
    • Typed E.setBootCode()

    to clear the old code. After reset(), old code is still present and executed, visible by console.log() messages from the old code. What am I missing?


  • In left pane type reset() then save(), it will clear the saved program.

  • Thanks, Frida. I'm pretty sure I tried that as well, though.

    Will try again.

  • The simplest way is to do what you did for the reset, but to leave the button pressed. The red led will flash 5 times (still keep it pressed for at least 1 second after the flashing stops) and then any saved code will be removed automatically. You'll need firmware 1v94 or later for that to work though.

    Otherwise E.setBootCode("") should wipe any 'save on send' code out, as well as saved code. The quotes might be required though - I can't remember

  • E.setBootCode("") did it, thanks!

    You might want to update the documentation.

  • Thanks - will do! I'll also make sure that E.setBootCode() work on 1v95 firmwares

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

Stored code not cleared after reset?

Posted by Avatar for krheinwald @krheinwald