We made it super easy to get the Arduino IDE set up for use with M2.
If you'd rather read something, here is a great tutorial:
Here is a great tutorial:
Either way, use this address:
And select the M2 board and install like this:
This is in alternate method that works fine since M2 is based on Arduino Due using the Native port:
This article will walk you through each step to get you started developing with M2. The end result will be a blinking blue LED.
Step 1. Go to Arduino.cc and click "download" tab, or here: https://www.arduino.cc/en/Main/Software
Step 2. Download whatever platform you are using. For this example, we are using a Windows 7 machine, so we clicked "Windows ZIP file for non admin install".
Step 3. Download the IDE and unzip to your computer.
Step 4. Open Arduino application and click: Tools -> Board -> Board Manager.
Step 5. Click Install for "Arduino SAM boards (32-bit ARM Cortex-M3) by Arduino"
Step 6. Once complete, click "close".
Step 7. Change board to "Arduino DUE (Native Port)"
Step 8. Plug in your M2 via USB to your computer. You may see some drivers being installed if this is the first time.
Step 9. Change the port to the correct serial port for M2.
Step 10. Open "Blink" example found at File -> Examples -> 01. Basics -> Blink.
Step 11. Change 13 to 5 (in 3 places)
Step 12. Press the "Upload" button and you should see the Blue LED blinking after a few seconds
Extra credit: Go to this page to learn what the pin number of the other LEDs are:
Try making a different LED blink by changing to a pin number in the sketch.