I am very new with Arduino and would be glad for any help that I can get. I'm using the Mega 2560.
The board was writing to the Serial Port and I decided to upload a modified sketch which it failed because the serial port is already in use. I tried pushing the reset switch and it then resets back to the previously uploaded sketch. I had no choice but to unplug the board which then the port could not be detected unless I restart my computer. (I tried disabling and enabling the port on Control Panel)
Is there a way for me to upload a new sketch without going through all the trouble?
In use by what? Have you plugged something into it? You shouldn't have to go to that trouble, and restarting the computer is something I never have to do (except the usual reasons under Windows, heh).
On the Mega you have multiple serial ports. You can plug your device into one of the other ones (Serial1, Serial2, Serial3) and leave the original serial for uploading sketches.
Press and Hold the reset button on your Arduino. Then click the "Upload" button your computer. 1-2 seconds (you'll have to play with this part of the delay) after the "Sketch: xxxx bytes of xxxx" message, release the reset button.
I was using LabVIEW as the receiving end of the serial connection. I just realised it was LabVIEW that gave the error because it was looking into the same port. Should have mentioned that earlier, sorry. Is there a solution to this?
Thank you for the reply. I have some constraints on my project which I hope to have minimal physical connections between the board and the computer. However, I think I can do away with the problem by modifying some part of the code. Thanks once more.
I'm having a similar issue with Arduino 022 and Uno board. I used Serial.println to do some debugging with serial monitor, unplugged the board after that and now I can't upload sketches anymore:
processing.app.SerialNotFoundException: Serial port 'COM3' not found. Did you select the right one from the Tools > Serial Port menu?
I did select the right port before but now the Serial port menu is grayed out and inaccessible.
Additionally, I was getting "Serial port COM3 already in use" error before this and I tried unpluggin and/or resetting, which I assume led to the new "Not found" error.
Rebooting Windows does help, however it's a hardly the best solution.
ilya:
I'm having a similar issue with Arduino 022 and Uno board. I used Serial.println to do some debugging with serial monitor, unplugged the board after that and now I can't upload sketches anymore:
processing.app.SerialNotFoundException: Serial port 'COM3' not found. Did you select the right one from the Tools > Serial Port menu?
I did select the right port before but now the Serial port menu is grayed out and inaccessible.
Additionally, I was getting "Serial port COM3 already in use" error before this and I tried unpluggin and/or resetting, which I assume led to the new "Not found" error.
Rebooting Windows does help, however it's a hardly the best solution.
to minimize that, go on device manger and change the serial port number to a higher one like com10. This helped me but dont solve the problem.