Changing to Serial1 returns empty strings;
>var serial = Serial1; =Serial1 >var pins = { rx: D0, tx : D1 }; ={ rx: D0, tx: D1 } >function test(baud) { : serial.removeAllListeners(); : var l=""; : serial.on('data', function(d) {l+=d;}); : serial.setup(baud, pins); : serial.write("AT+GMR\r\n"); : setTimeout(function(){console.log(JSON.stringify(l));},800); :} =function (baud) { ... } >//digitalWrite(B9,1); // enable on Pico Shim V2 =undefined >setTimeout(function() { test(9600); }, 2000); =1 >setTimeout(function() { test(115200); }, 3000); =2 >setTimeout(function() { test(57600); }, 4000); =3 >setTimeout(function() { console.log("Done!"); }, 5000); =4 "" "" "" Done! >
@user118421 started
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.
Changing to Serial1 returns empty strings;