I try to save power on my leonardo. For that, I use the sleep mode.
Following code is working well:
attachInterrupt(0,wakeupFunction,LOW); //wakeupbutton : pin 3 on leonardo!!!
sleep_disable(); //fully awake now
Serial.begin(9600); // Debugging only
I am happy, i can light my room with the little on board led. But!
I am on windows 7, and after uploading this useful sketch, port COM is not usable. Board is detected by windows, port COM exists, but arduino 1.0.2 says that "port com is already in use" or "port com is not reachable". And I have to burn the bootloader to rescue my leonardo.
What the duck with serial on leonardo in sleep mode ?