Thanks for the feedback - the firmware update is definitely something I'd like to be able to make more obvious...
As far as transferring data to Espruino via USB, your best bet is really to send data as function calls (had you seen this?). If you send: d("my data here") and then just write a function called d that handles your data, it should all work nicely.
Normally the Espruino console echos what it receives back down the serial port (so you can see what you're typing), and that's not so great for transfers so you can send echo(0). Espruino will then appear not to respond to anything except calls to console.log (it'll still be executing as normal though) until you type echo(1).
If you really want to handle whatever data gets sent down USB then you can move the console onto another device, for instance Serial1.setConsole(). After that you'll have to program Espruino via a USB-TTL convertor attached to the serial port though (see Wiring Up ) - either that or you just have to reset and then program it again each time.
So basically, if you want to be able to program Espruino via USB at the same time, you have to play by the rules of the console and send data as function calls. However if you don't need that or can use Serial, you can use the USB as you wish.
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 Michu,
Thanks for the feedback - the firmware update is definitely something I'd like to be able to make more obvious...
As far as transferring data to Espruino via USB, your best bet is really to send data as function calls (had you seen this?). If you send:
d("my data here")
and then just write a function calledd
that handles your data, it should all work nicely.Normally the Espruino console echos what it receives back down the serial port (so you can see what you're typing), and that's not so great for transfers so you can send
echo(0)
. Espruino will then appear not to respond to anything except calls toconsole.log
(it'll still be executing as normal though) until you typeecho(1)
.If you really want to handle whatever data gets sent down USB then you can move the console onto another device, for instance
Serial1.setConsole()
. After that you'll have to program Espruino via a USB-TTL convertor attached to the serial port though (see Wiring Up ) - either that or you just have to reset and then program it again each time.So basically, if you want to be able to program Espruino via USB at the same time, you have to play by the rules of the console and send data as function calls. However if you don't need that or can use Serial, you can use the USB as you wish.