Ahh - the actual IDE/app loader implements XON/XOFF flow control (which isn't in the Python code) - but adding a few delays is an easy way to work around that.
I think sometimes you will get a connection failed and will have to try again - radio is not 100% reliable. You just have to try again.
However what can happen is half the command gets left on the 'input line' and then next time you connect it gets messed up.
That's easy enough to fix - you'll note the original command that was sent starts with command = "\x03\x10 - if you make sure that's also in your code it should really help you.
\x03 - char code 3 is Ctrl-C - it'll clear the input line, removing any previous half-commands that might be on it
\x10 - char code 16 - is a special code for Espruino that means 'echo off for line'. The rest of that input line is then not repeated out to the console (usually you type a character and it is echoed back to you). That should really help with your upload too as you're halving the amount of data that gets transferred
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.
Ahh - the actual IDE/app loader implements XON/XOFF flow control (which isn't in the Python code) - but adding a few delays is an easy way to work around that.
I think sometimes you will get a connection failed and will have to try again - radio is not 100% reliable. You just have to try again.
However what can happen is half the command gets left on the 'input line' and then next time you connect it gets messed up.
That's easy enough to fix - you'll note the original command that was sent starts with
command = "\x03\x10
- if you make sure that's also in your code it should really help you.\x03
- char code 3 is Ctrl-C - it'll clear the input line, removing any previous half-commands that might be on it\x10
- char code 16 - is a special code for Espruino that means 'echo off for line'. The rest of that input line is then not repeated out to the console (usually you type a character and it is echoed back to you). That should really help with your upload too as you're halving the amount of data that gets transferred