Sorry, I’m still a newbie with posting code. Those are the exact 2 lines in loop(). Obviously I skipped over the int i and Serial.begin(115200) to make it compile and run. The speaker and amp are connected to my laptop headphone jack with a badly shielded cable. Whenever the Electron sends data it clicks loudly since it is near the speaker cable. The same thing happens no matter what code I use to print to USB. No matter what values I print even a constant. No matter what terminal software I use. I simplified it and tested it this way, before I posted. Resetting termite, restarting termite, rebooting Electron, none of them cause the data to display again. I must unplug the USB cable. It always stops exactly when the speaker clicks. That should be a hint for us. I tried unplugging the stereo cable, same problem, without the clicks. So you see the exact code does not matter. But it is exact above, just without the formatting
It could be something else like the radio transmitter kicks on and sucks power from the battery and USB and your laptop has a reset-able “fuse” on the USB when you draw too much current for it.
USB can be used for more power than the 500mA limit the the original spec allowed these days, so no, I don’t think it would be a design flaw at all. Just different specs.
I am not sure what your problem is–I just wanted to point out there are many possibilities.
The USB driver has gone through a significant overhaul in preparation for the next release. You can get this from the feature/0.5.x branch if you are building locally. We will be making this available as a pre-release in our online tools soon - would be great to have your testing and feedback when that’s done.