A lot of our example sketches have a
while (!Serial);
line in setup(), to keep the board waiting until the USB is opened. This makes it a lot easier to debug a program because you get to see all the USB data output. If you want to run your Metro M0 without USB connectivity, delete or comment out that line
A vast number of Metro 'failures' are due to charge-only USB cables
We get upwards of 5 complaints a day that turn out to be due to charge-only cables!
Use only a cable that you know is for data syncing
If you have any charge-only cables, cut them in half throw them out. We are serious! They tend to be low quality in general, and will only confuse you and others later, just get a good data+charge USB cable
No problem! You can 'repair' a bad code upload easily. Note that this can happen if you set a watchdog timer or sleep mode that stops USB, or any sketch that 'crashes' your Metro
- Turn on verbose upload in the Arduino IDE preferences
- Plug in Metro M0, it won't show up as a COM/serial port that's ok
- Open up the Blink example (Examples->Basics->Blink)
- Select the correct board in the Tools menu, e.g. Metro M0 (check your board to make sure you have the right one selected!)
- Compile it (make sure that works)
- Click Upload to attempt to upload the code
- The IDE will print out a bunch of COM Ports as it tries to upload. During this time, double-click the reset button, you'll see the red pulsing LED and the NeoPixel will be green that tells you its now in bootloading mode
- The Metro will show up as the Bootloader COM/Serial port
- The IDE should see the bootloader COM/Serial port and upload properly
This seems to happen when people select the wrong board from the Arduino Boards menu.
If you have a Metro M0 (look on the board to read what it is you have) Make sure you select Metro M0 - do not use Feather M0 or Arduino Zero
Theres two COM ports you can have with the M0, one is the user port and one is the bootloader port. They are not the same COM port number!
When you upload a new user program it will come up with a user com port, particularly if you use Serial in your user program.
If you crash your user program, or have a program that halts or otherwise fails, the user com port can disappear.
When the user COM port disappears, Arduino will not be able to automatically start the bootloader and upload new software.
So you will need to help it by performing the click-during upload procedure to re-start the bootloader, and upload something that is known working like "Blink"
UNO-type Arduinos have a seperate serial port chip (aka "FTDI chip" or "Prolific PL2303" etc etc) which handles all serial port capability seperately than the main chip. This way if the main chip fails, you can always use the COM port.
M0 and 32u4-based Arduinos do not have a seperate chip, instead the main processor performs this task for you. It allows for a lower cost, higher power setup...but requires a little more effort since you will need to 'kick' into the bootloader manually once in a while
This is likely because the bootloader is not kicking in and you are accidentally trying to upload to the wrong COM port
The best solution is what is detailed above: manually upload Blink or a similar working sketch by hand by manually launching the bootloader
You probably don't have Metro M0 selected in the boards drop-down. Make sure you selected Metro M0.
Page last edited May 03, 2017
Text editor powered by tinymce.