Leonardo: constructor with delay knocks out serial port #6277
Labels
Architecture: AVR
Applies only to the AVR microcontrollers (Uno, etc.)
Type: Bug
USB: CDC serial
Serial interface used by MCUs with native USB (e.g. Leonardo) to communicate with the computer
In a forum in the Netherlands, someone encountered a possible bug: http://arduinoforum.nl/viewtopic.php?f=13&t=2533.
I can replicate the problem in Windows 10 and Ubuntu linux 17.04 with Arduino IDE 1.8.1 and 1.8.2 and with the Leonardo bootloader that came with version 1.6.8 and 1.8.2.
Below is a test sketch. After uploading, the serial port disappears and uploading once more is not possible. The delay() is needed and the parameter for the constructor is needed.
There is a workaround to be able to upload a sketch. I turn on the verbose output for upload in the preferences and when the Arduino IDE tries to upload then I press the reset button on the Arduino board.
The text was updated successfully, but these errors were encountered: