I got a neat ESP32 board and tested Espruino (1.92) on it. Works like a charm when using the Web IDE. Uploading via NPM espruino module works. About once in 10 times. It sends data (-v switch is very useful here), and it usually does something, but often it seems to forget everything immediately, like if there is a reset() after upload.
E.g. I have a small program uploaded which:
In the cases where it does not work, the serial console is usually no longer working until I reset the board. In the few cases where the console is accessible, I can connect via minicom, and I see nothing being remembered of my program. Looks like a reset happened. Namely the variable g I use for the OLED is not defined anymore. No wonder it cannot write anything to the display.
The Web IDE works. Always.
Any idea what's causing the NPM espruino to not work as well as the Web IDE?
Digging a bit around, this works and it's reliably working: Use espruino -o x.js MYPROGRAM.js and then upload the temporary output, which resolves all require() modules via wifi (nc ESP32IP 23 < x.js)
That proves at least that whatever the espruino command does, seems to work. The problem might be an intermittent reset caused by the serial port.
I'm sure others will chip in soon, but there seemed to be some kind of issue with the actual USB interface chip on the ESP32 (and other?) boards. Repeated connect/disconnect cycles close together could totally break it - I seem to recall there was a bug filed because there were prob;ems with it after using the esp32 flasher tool.
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem