Hi tve, digging a little bit into the documentation i've found that save() save the code on the flas after (not before) the code i wrote, is it right? Is it bettor to use E.on('init',function()) instead of save?
What i'm expecting is to try to save the code inside the flash so next time the esp boot it will read the code i wrote (i'm a little bit confused about this, because i understand that when the esp boot read immediately the espruino firmware and the javascript interpreter so the code need to be readed after the firmware... sorry if it can be stupid but i'm trying to understand how it works)
so now writing save(); before the code i've got this error:
Erasing Flash.....
Writing...
Compressed 12276 bytes to 703
CheckUncaught SyntaxError: Got '(' expected ID
at line 1 col 10
function (req, res) {
^
another strange behave that i found is when the ide send the code to the esp (without trying to save) i receive a warning message that "the module http is not found" but the webserver work.
Many thanks.
Marco
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 tve, digging a little bit into the documentation i've found that save() save the code on the flas after (not before) the code i wrote, is it right? Is it bettor to use E.on('init',function()) instead of save?
What i'm expecting is to try to save the code inside the flash so next time the esp boot it will read the code i wrote (i'm a little bit confused about this, because i understand that when the esp boot read immediately the espruino firmware and the javascript interpreter so the code need to be readed after the firmware... sorry if it can be stupid but i'm trying to understand how it works)
so now writing save(); before the code i've got this error:
and to reply to your question, if i type reset()
another strange behave that i found is when the ide send the code to the esp (without trying to save) i receive a warning message that "the module http is not found" but the webserver work.
Many thanks.
Marco