Just wanted to add that while Espruino has a hard time turning its internal state back into text, it doesn't mean that save() suffers from the same problems as it saves the internal interpreter state.
I think that in your case, using your existing code and just saving before you press BTN1 would solve your problems. At least it worked for me :)
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Just wanted to add that while Espruino has a hard time turning its internal state back into text, it doesn't mean that
save()
suffers from the same problems as it saves the internal interpreter state.I think that in your case, using your existing code and just saving before you press BTN1 would solve your problems. At least it worked for me :)