• Still experimenting with "the bare PICO" and reached some standalone scenario:
    I plan to modify the http://www.espruino.com/Single+Button+Co­mbination+Lock
    to automatically run as soon as it got power (save(), onInit ...).

    The original code uses console.log to show status which I like to keep when managable.
    Is there a way to detect that there is no console attached so I can switch to alternative (LED signals)?

    TIA, Uli

  • You can check process.env.CONSOLE=="USB" - this will detect if Espruino has a connection to your PC (eg. it appears as a COM port).

    However it has no way to know if you have an application running on the PC that is looking at what it is printing!

  • @Gordon: Thanks for your info; so I have not overlooked a useable functionality in the references.

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

is there a way to detect my PICO is connected to console/Web IDE?

Posted by Avatar for UliMerkel @UliMerkel

Actions