Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
USB hot-plug doesn't work on MKRZero? #409
Is this a bug in the Arduino USB code or am I doing something wrong?
The problem can very easily be recreated in a simple hello world sketch
With the latest Arduino installed (1.8.9):
I first saw this problem in some application code (C#) I was writing, but then traced it all the way back to this simple test.
The Arduino serial monitor doesn’t report any problem, but it is clear (if the Arduino is set to loop back received data) that the data is not sent.
The only way I found to get out of this problem, is to power the hardware OFF and then ON Again (which is a no go for my application).
Perhaps the USB code is missing some sort of re-init when hot-plugged?
I will try and see if I can work around this with USB.detach / attach or something... but it would be nice to get this looked at by some more skilled programmers.