Okay, first off, I'm new here, teaching myself C, and am not sure what's going wrong - which is why I'm posting my situation here.
I have an Arduino Leonardo board and have uploaded my sketches many times with no problems. Earlier this week I uploaded new code and immediately after uploading the code the Arduino disappears from the computer (Windows 7) and I get this message "USB Device Not Recognize". In Windows 7 device manager, the only listing I see is "Unknown Device". I've tried updating the driver, uninstalling/reinstalling the driver - each time pointing to the Arduino Driver folder. Each time the result is the same - "The Best Driver software for your device is already installed". I've tried all the other USB ports - same problem. I've tried rebooting the computer - same problem. Pressed the "reset" button on the Arduino - same problem. There is also nothing listed under "PORTS" in the device manager and the "tools/serial port" Arduino menu option is ghosted out. I've always kept the Arduino in it's original packaging when not in use. I can't imagine something went wrong with it.
I contacted the place where I purchased the Arduino and they kindly sent me a replacement with no questions. When I hooked up the new board, the computer saw it fine. Everything looked good to go. I then uploaded my code and suddenly the Arduino disappears from the computer and I get the same message "USB Device Not Recognize". Nothing listed in the ports - same issue as before.
Which leads me to my question - can uploading code harm an Arduino Leonardo board? Is there a way to restore the Arduino?
Thanks in advance!