• 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?

  • Serial1.on('data',......

    Serial1.read() and Serial1.available() are available but handling the data as it comes is far preferable

  • 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.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

What's the 'inverse' of console.log or print on the USB?

Posted by Avatar for user106712 @user106712

Actions