Something has malfunctioned with my Arduino Micro. I had uploaded a sketch to it and now it won't accept uploads anymore. In addition, the Arduino IDE becomes extremely unresponsive whenever this Micro is connected. I have another Micro that works fine, it's something specific to this one (which was working before I uploaded list last sketch.)
One thing that may or may not be relevant is that the sketch I uploaded was example code that included the line Serial.being(115200). Prior to this I have always used the default of 9600.
When I reset the Micro I see Arduino Micro bootloader (COM6) appear in the device manager (this is on Windows 7) and then it refreshes to Arduino Micro (COM7).
While the bootloader COM6 appears the Arduino IDE responds normally and shows COM6 in the Serial Port menu. When the Micro appears as COM7 there are two different possible scenarios that occur and I don't know what causes one or the other, but I've seen both repeatedly. They are:
-
The Serial Port menu is empty even though Windows device manager shows Arduino Micro COM7. In this case the IDE works normally although I can't upload code.
-
The Serial Port menu shows COM7 but the IDE is extremely slow. Clicking on a word in the menu bar will open a blank menu that takes 30+ seconds before the words appear on the menu.
When I try to upload code despite the IDE being incredibly slow, I see that COM7 remains showing in the device manager. The IDE shows:
Binary sketch size: 5,012 bytes (of a 28,672 byte maximum)
Forcing reset using 1200bps open/close on port COM7
but the Micro apparently doesn't reset.
I've tried pressing the reset button strategically during the upload process but that hasn't helped.
The script I uploaded is below.
// BigNumber test: calculate e
#include "BigNumber.h"
void setup ()
{
Serial.begin (115200);
Serial.println ();
delay(3000);
Serial.println("Starting up");
BigNumber::begin (50); // max around 160 on the Uno
// some big numbers
BigNumber n = 1, e = 1, one = 1;
int i = 1;
BigNumber E; // previous result
char message[90];
unsigned long start = millis ();
do
{
Serial.print("Loop ");
E = e;
n *= i++; // n is i factorial
e += one / n;
sprintf(message, "iteration: %d\te = %f", i, e);
Serial.println(message);
delay(100);
} while (e != E);
unsigned long time = millis () - start;
Serial.println (e);
Serial.print (time);
Serial.println (" mS");
} // end of setup
void loop () { }
Oh, one more thing. The message that most commonly appears when I try and "help" the upload process by pressing the reset button while the upload is just sitting there doing nothing is "Serial port 'COM7' is already in use. Try quitting any programs that may be using it." This message appears just about instantly when I press the reset button.
Also, I have verbose compilation and upload set in preferences so when I say the upload is sitting there doing nothing I mean that all the compilation messages have scrolled by and the message about Forcing reset using 1200bps open/close on port COM7 and then no other messages are appearing. Normally I would see the avrdude messages scrolling by, but not now with this problem.