-
• #2
Serial1.on('data',...
...Serial1.read()
andSerial1.available()
are available but handling the data as it comes is far preferable -
• #3
Thanks @Gordon!
I am curious about the relationship between Serial1 and console. I still have an issue about getting some leading chars from console.log http://forum.espruino.com/conversations/345448.
Also, with Serial1.on('data' ...) I will only get data from the USB port IF the IDE is connected to port 23.
Nothing comes out when the IDE is disconnected.
Yet when I send from 8266 by console.log(), the IDE needs to be off or the data are collected there rather than going to the USB. Using print() or Serial1.print() does not change things.
Please elucidate.
-
• #4
Wed 2020.04.08
'the relationship between Serial1 and console'
The 8266 is connected to a desktop on the USB port.
console.log or print would send a string out to the USB.
What is the default function to read from the same port, with data coming from the desktop?