-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sending inline module fails silently on command line #6
Comments
I'm not sure it's you. I think the problem might be that node's serial port implementation is a bit more efficient than the Web IDE's, and it sends the data to Espruino much more quickly. There's a bit of an issue with the USB serial port right now (on Pico and Espruino) in that it can stall data coming in for around 5-10ms, but after that the host computer actually throws it away. I've got a fix planned for it as part of: espruino/Espruino#221 In your code I'd guess the issue is that you're defining a huge function and then executing it (for the closure), and it takes enough time to execute that a lot of what comes after gets lost. You could hackily fix it for now by applying the following patch to the EspruinoTools repo:
That'll delay sending each line and should make it work fine. ... but hopefully a proper fix on the Pico side will be coming soon. |
Thanks for getting back to me so quickly! That does send the code to the Pico, but now |
That's strange - is there any way to reproduce it, or is it random? |
It only happens when I send I think that |
Ahh - sorry, I just read this again and realised what the issue probably is - I'd guess that the data isn't read read from USB and so Espruino blocks - in fact that could have had a lot to do with the problem in the first place. Hopefully it'll be quite an easy fix once I figure out why the data isn't getting read. |
Hi,
I'm writing an application that uses
espruinotool
to send code to a Pico when the app starts.The code I'm using is
source.js
in this gist . I declare the CAP1188 module but in this example I'm not using it, instead I have a setInterval at the bottom that should flash the onboard LED on/off.I send the file to the Pico using
espruinotool --verbose --port /dev/cu.usbmodem1411 /Users/andrew/Projects/oss/ucl-sensors/sensorama/espruino/source.js espruino-tools
and the output is here interminal-output.log
.There do not seem to be any errors in the log output but the LED on the Pico does not flash.
I've also tried using the
--minify
flag and this has the same (non) result.Sending the code using the Espruino Web IDE flashes the LED as expected. Sending the code via the CLI to an Espruino v1.3b also flashes the LED.
Any ideas what I'm doing wrong?
The text was updated successfully, but these errors were encountered: