Closed
Description
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.
class myLibT
{
public:
myLibT( char a);
};
myLibT::myLibT( char a)
{
delay(10); // This delay together with the parameter kills the usb-serial.
}
myLibT serialwrecker( 0); // the parameter is needed
void setup()
{
}
void loop()
{
}