Please could you give it a go? You should now be able to call Puck.write and eval right after each other, and it'll queue the eval until the write has finished.
It'll be a little slower since it waits to receive all of the data from the Puck.write command before executing whatever is next, but I think that's probably worth it. For high speed stuff you can still use Puck.connect.
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've now added some queueing functionality to the
puck.js
file at https://espruino.github.io/js/puck.jsPlease could you give it a go? You should now be able to call
Puck.write
andeval
right after each other, and it'll queue theeval
until thewrite
has finished.It'll be a little slower since it waits to receive all of the data from the
Puck.write
command before executing whatever is next, but I think that's probably worth it. For high speed stuff you can still usePuck.connect
.