How could I stop Espruino to move console or force it to move to Serial6 (which does not exist on Espruino board?) when USB cable is disconnected?
I saw the case to do it after boot by defining onInit function and call setConsole() there.
Is there event to watch for USB cable disconnected so that I can call Serial6.setConsole()?
I embed Espruino into a keyboard together with Adafruit EZ-Key module. Espruino scan the keyboard and send data which key is pressed to EZ-Key via Serial1(B6, B7). EZ-Key act as a BT Keyboard for iPhone. All USART1-5 enabled ports are used for keyscan excpet B6 and B7. I do want to have console on USB for debug but I also like to use it without USB connected for real use.
© Espruino, powered by microcosm.
Report a problem