I am trying to implement FOTA .... Initially i am trying to send my code from Serialport3. Application receiving the code after that i am using eval.. (function )
function Update(serial) {
var code = {line:''};
serial.on('data', function(data) {
code.line += data;
var idx = code.line.indexOf('\n');
while (idx>=0) { var line = code.line.substr(0, idx);
code.line = code.line.substr(idx+1);
print ('\r\n code.line:'+line);
eval(line);
idx = code.line.indexOf('\n'); } });
}
function onInit(){
Serial3.setup(115200);
Serial3.println("Data on uart3");
Update(Serial3);
}
onInit();
save();
```
I am trying this code ..
but here i am getting old and new application from the flash on power on... how we can overwrite old application with new one..?
Thanks and Regards
Vishnu
Search Options
Types to Display
Espruino
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.
I am trying to implement FOTA .... Initially i am trying to send my code from Serialport3. Application receiving the code after that i am using eval.. (function )
```
I am trying this code ..
but here i am getting old and new application from the flash on power on... how we can overwrite old application with new one..?
Thanks and Regards
Vishnu