If you've followed the Setting up your Metro Express page, you should be ready to roll. We need to make some modifications to Arduino to allow it to work with the Metro Express.
After you have downloaded and installed the latest version of Arduino IDE, you will need to start the IDE and navigate to the Preferences menu. You can access it from the File menu in Windows or Linux, or the Arduino menu on OS X.
A dialog will pop up just like the one shown below.
We will be adding a URL to the new Additional Boards Manager URLs option. The list of URLs is comma separated, and you will only have to add each URL once. New Adafruit boards and updates to existing boards will automatically be picked up by the Board Manager each time it is opened. The URLs point to index files that the Board Manager uses to build the list of available & installed boards.
To find the most up to date list of URLs you can add, you can visit the list of third party board URLs on the Arduino IDE wiki. We will only need to add one URL to the IDE in this example, but you can add multiple URLS by separating them with commas. Copy and paste the link below into the Additional Boards Manager URLsoption in the Arduino IDE preferences.
Here's a short description of each of the Adafruit supplied packages that will be available in the Board Manager when you add the URL:
- Adafruit AVR Boards - Includes support for Flora, Gemma, Feather 32u4, Trinket, & Trinket Pro.
- Adafruit SAMD Boards - Includes support for Feather M0, Metro M0, Circuit Playground Express, Gemma M0 and Trinket M0
- Arduino Leonardo & Micro MIDI-USB - This adds MIDI over USB support for the Flora, Feather 32u4, Micro and Leonardo using the arcore project.
If you have multiple boards you want to support, say ESP8266 and Adafruit, have both URLs in the text box separated by a comma (,)
Once done click OK to save the new preference settings. Next we will look at installing boards with the Board Manager.
Now continue to the next step to actually install the board support package!
Since the Metro Express M0 uses an ATSAMD21 chip running at 48 MHz, you can pretty easily get it working with the Arduino IDE. Most libraries (including the popular ones like NeoPixels and display) will work with the M0, especially devices & sensors that use i2c or SPI.
Now that you have added the appropriate URLs to the Arduino IDE preferences in the previous page, you can open the Boards Manager by navigating to the Tools->Board menu.
Once the Board Manager opens, click on the category drop down menu on the top left hand side of the window and select Contributed. You will then be able to select and install the boards supplied by the URLs added to the prefrences.
First up, install the Arduino SAMD Boards version 1.6.15 or later
You can type Arduino SAMD in the top search bar, then when you see the entry, click Install
Next you can install the Adafruit SAMD package to add the board file definitions
You can type Adafruit SAMD in the top search bar, then when you see the entry, click Install
Even though in theory you don't need to - I recommend rebooting the IDE
Quit and reopen the Arduino IDE to ensure that all of the boards are properly installed. You should now be able to select and upload to the new boards listed in the Tools->Board menu.
Select the Adafruit Metro M0 Express from the dropdown.