Arduino: 1.6.5 (Windows 7), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"
Sketch uses 4,568 bytes (1%) of program storage space. Maximum is 253,952 bytes.
Global variables use 358 bytes (4%) of dynamic memory, leaving 7,834 bytes for local variables. Maximum is 8,192 bytes.
avrdude: ser_open(): can't open device "\.\COM5": The system cannot find the file specified.
avrdude: ser_drain(): read error: The handle is invalid.
Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
This report would have more information with "Show verbose output during compilation" enabled in File > Preferences.
THE BOARD PROCESSOR AND PORT IS CORRECT and picks up the arduino mega I reset the computer the port and used a different arduino mega and it still doesnt work I even redownloaded the program and the same result
It happened when I put the sensor shield on while uploading a program and then I get this. anyone can help