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 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!
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.
http://forum.espruino.com/conversations/863/#comment11883
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.