
KillaCycle (Customer) asked a question.
I often get the error "No device found on COM16, Failed uploading: uploading error: exit status 1" when I try to upload a program to my P1AM-200. At that point, the Port is grayed out, and I can't select any USB port. The serial monitor stops working as well. This might happen perhaps once in three of four uploads. Only occurs upon upload.
If I change the USB port to another USB port on my computer, it seems to correct itself and all seems fine.
If anyone can suggest any clue as to what I might be doing wrong, it would be greatly appreciated.
I don't get this behavior with any other type of Arduino development board.
I have Windows 10
Arduino IDE Version 2.3.6
Thanks in advance,
Bill D.
These devices have a bootloader that runs code on power up or device reset. The bootloader allows for code to be uploaded without the need of a programmer. When entering bootloader mode, the device will change com ports.
Sometimes (for any numerous reasons) the transition of switching com ports can get mucked up, and the Arduino IDE that is sitting there waiting for the device to switch back to the original com port times out which is the "exit status 1". This is just a generic error that isn't useful for debugging.
It also doesn't mean the program wasn't uploaded either, but it would be best to re-upload your code.
There's two options that can be done:
Bootloader Mode
Don't forget to change the IDE com port again after uploading code in bootloader mode.
The issue only seems to occur when you tie up the USB with chatter on the serial monitor. No serial monitor messages = Zero problems with the USB port.
If I wish to use serial monitor calls for trouble shooting, I toggle them on and off in the main loop using the small switch on the CPU.
Normally, I leave that switch off. Thus, the USB is just used for programming (and not cluttered with diagnostic chatter). If I need the diagnostics, I flip on the built in switch on the CPU to turn the diagnostic chatter on. Then I toggle it the small switch off when I have figured out the issue and I am ready to use the serial port to re-program the PIAM-200.
(The constant SWITCH_BUILTIN is predefined by the PIAM-200 (or PIAM-100) to be internal pin# 31)
>>>>>>>>>>>>>>>>>>>>
void loop()
{
DebugFlag = digitalRead(SWITCH_BUILTIN); // switch on (or off) serial monitor chatter in the code
.......
if (DebugFlag) { // if the debugging flag is HIGH, then print useful stuff to the monitor
Serial.print("Fil Dia = ");
Serial.println(LaserDiaReadingF, 3);
............
}
.........
>>>>>>>>>>>>>>>>>>>>>>>
This might be helpful for someone else that may have a similar issue.
Looking forward,
Bill D.