Is there a way to check if Espruino is connected to a computer via USB besides something like that?
E.getConsole() == 'USB';
I'd like my program to have a different behaviour depending on that factor.
@MarkBloom 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.
Is there a way to check if Espruino is connected to a computer via USB besides something like that?
I'd like my program to have a different behaviour depending on that factor.