The TTY would almost certainly be different, but a command like echo 'a' > /dev/tty.usbmodem* would probably be fine.
I'm not sure about the code that you post though - is that for an Espruino board? When Espruino is connected by USB, data comes in on the USB object, so I'd imagine that the following:
USB.on('data', function (data) {
state = !state;
LED1.write(state);
});
is more likely to work. Maybe you had the code in there already, and it only started working when you moved the console away from USB with: Serial1.setConsole();?
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.
Hi - thanks for posting up...
The TTY would almost certainly be different, but a command like
echo 'a' > /dev/tty.usbmodem*
would probably be fine.I'm not sure about the code that you post though - is that for an Espruino board? When Espruino is connected by USB, data comes in on the
USB
object, so I'd imagine that the following:is more likely to work. Maybe you had the code in there already, and it only started working when you moved the console away from USB with:
Serial1.setConsole();
?