Step by step tutorial for uploading

Hi all,

I’m new to Autonomo and I really do not understand the procedure how to upload code and restart this board… I often get failures like “No device found on COM…” or I need to restart the Arduino IDE because Ii get

processing.app.debug.RunnerException
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:140)
at cc.arduino.UploaderUtils.upload(UploaderUtils.java:78)
at processing.app.Sketch.upload(Sketch.java:1178)
at processing.app.Sketch.exportApplet(Sketch.java:1152)
at processing.app.Sketch.exportApplet(Sketch.java:1124)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2430)
at java.lang.Thread.run(Thread.java:745)
Caused by: processing.app.SerialException: Error touching serial port ‘COM28’.
at processing.app.Serial.touchForCDCReset(Serial.java:87)
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:129)
… 6 more
Caused by: jssc.SerialPortException: Port name - COM28; Method name - openPort(); Exception type - Port busy.
at jssc.SerialPort.openPort(SerialPort.java:164)
at processing.app.Serial.touchForCDCReset(Serial.java:81)
… 7 more

Sometimes I get it and my code is running, but it is not reproducable or I do not understand how to do it correctly.

I see “Uploading…” in the Arduino IDE but nothing happens. I tried to press the reset button to bring the board into bootloader mode, does not help.

Does someone give me a hint, how I can reproducable upload code and restart? Might also be useful for other newbees to Autonomio.¨

Kind regards

Had simular problems while programming mine.
Try setting an delay( like 30 sec), at the beginning at setup().
Then reset and upload at the same time.

Here are a few tips that might help:

  1. Ensure that you have selected the correct COM/TTY port. During the programming stage the device will switch to a secondary port. This should happen automatically, and then it will revert back to the normal port. However, if there was an issue during the upload, it might stay open on the secondary port.

  2. You shouldn’t press reset during the upload/program sequence. This restarts the board, it does not put it in bootloader mode. Bootloader mode is achieved by opening the main port at 1200bps. This causes the board to switch to a secondary port and is handled automatically as part of the upload/program sequence.

  3. If you have multiple sketches open you will want to make sure the serial monitor is closed. If the serial monitor was opened by the current sketch it should work fine, however, if it was opened by another sketch it may block the port.

  4. You may find it useful to turn on verbose output during the compilation and upload stages. You can find the relevant options under File->Preferences.

  5. You should wait until the previous upload/program process has completed before trying again. The green status bar (lower right) will disappear after the process has completed either successfully or in a failure.

Thanks a lot for the tips. I understand the principle now much better.

The most important info was:
"Ensure that you have selected the correct COM/TTY port. During the programming stage the device will switch to a secondary port. This should happen automatically, and then it will revert back to the normal port. "

That does not happen automatically on my installation (Win7, Arduino IDE 1.6.7).

In theory it should switch to COM5:
Forcing reset using 1200bps open/close on port COM3
PORTS {COM3, } / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {COM5, } => {COM5, }
Found upload port: COM5

but often I got

PORTS {COM3, } / {COM3, } => {}
PORTS {COM3, } / {COM3, } => {}
PORTS {COM3, } / {COM3, } => {}
PORTS {COM3, } / {COM3, } => {}
PORTS {COM3, } / {COM3, } => {}
Couldn’t find a Board on the selected port. Check that you have the correct port selected. If it is correct, try pressing the board’s reset button after initiating the upload.

As you told, pressing the boards’s reset button makes the situation even worse…

What I observed: After an upload, it shows me in Toos->Port: the correct port, but the tick before the COM port in the is not set again to COM3 and in the lower right hand corner of the IDE it shows “SODAQ Autonomo on COM5”.

IF I mark Tools->Port EVERY time before I initiate an upload, it works perfectly and reproducable!

Thanks again for help!

Gabriel, what I often see (OSX) is that the first upload failes (cannot find the port) and second upload works.

You may also find that if there is a current upload in progress, it may affect attempts to select a different port from the menu. I have found that while it allows you to select a different port, it then reverts back to the previously port, once the upload has been completed or has failed.

I should mention that I use Windows, and my advice may not directly apply to those using other platforms.