I'm wondering if it's related to the:
USB.setConsole(true);
And is getting unhappy because there's nothing connected to the USB. In this case, how can I make it do USB serial if USB is connected, and if not, not send the console to Serial1, which will be connected to something that will be broken by any console output?
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.
Running my desk lamp code, I'm having a very strange issue....
When powered by the USB port on a computer, it runs flawlessly for days.
When powered by a USB charger, it freezes (setBusyIndicator LED is on continuously) after a short time.
What could cause this behavior?
Code is here: https://github.com/SpenceKonde/AzzyProjects/blob/master/GraphProject/DeskController/DeskController.js
I'm wondering if it's related to the:
USB.setConsole(true);
And is getting unhappy because there's nothing connected to the USB. In this case, how can I make it do USB serial if USB is connected, and if not, not send the console to Serial1, which will be connected to something that will be broken by any console output?