Hi... Yes, sending the code string to eval is probably the best method. Obviously if you're using some kind of non-secured system you might want to think a bit about security though!
Executing something using eval can actually alter the state of the root scope (the value doesn't have to be returned), so you can actually just do:
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.
Hi... Yes, sending the code string to eval is probably the best method. Obviously if you're using some kind of non-secured system you might want to think a bit about security though!
Executing something using
eval
can actually alter the state of the root scope (the value doesn't have to be returned), so you can actually just do:The other option if you want something more physical is to save the following code:
And then to put any code you have on the SD card.