Indeed.
I reduced a bit the code, did a full restart of everything and uploaded the code at the bottom of this post under the dashed line. The output is just below that.
You can see that it is actually the serial garbage (which is a known problem in 0.9.2.4), that is the cause of the (initial) error. That's why I originally added the setTimeout. Anyway, I took that setTimeout away for now.
After uploading and executing that code (which failed), I entered the following in the command window
=undefined
>Uncaught CWMODE failed: AT+CWMODE=1
at line 1 col 17
{if (err) throw err;}
^
in function "b" called from line 2 col 2
e):d.cmd("AT+CWJAP="+JSON.stringify(a)+","+JSON.stringify(c)...
^
in function "d" called from line 1 col 26
{e=void 0;var b;d&&(b=d(a))?(e=g,d=b):clearTimeout(c);void 0...
^
in function "e" called from line 1 col 291
...f&&(g[f](d),n=!0);n||e&&e(d)}b=b.substr(a+1);"\n"==b[0]&&(b=...
^
in function called from system
Uncaught CWMODE failed: undefined
at line 1 col 17
{if (err) throw err;}
^
in function "b" called from line 2 col 2
e):d.cmd("AT+CWJAP="+JSON.stringify(a)+","+JSON.stringify(c)...
^
in function "d" called from line 1 col 16
{e=void 0;d&&d()}
^
in function called from system
which in turn is again the same error as in all previous tests.
I'll put together another pico/esp8266 to see what that gives.
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.
Indeed.
I reduced a bit the code, did a full restart of everything and uploaded the code at the bottom of this post under the dashed line. The output is just below that.
You can see that it is actually the serial garbage (which is a known problem in 0.9.2.4), that is the cause of the (initial) error. That's why I originally added the setTimeout. Anyway, I took that setTimeout away for now.
After uploading and executing that code (which failed), I entered the following in the command window
That resulted in:
To display the full error, I entered this:
which then resulted in:
which in turn is again the same error as in all previous tests.
I'll put together another pico/esp8266 to see what that gives.
====================================================