9DoF Razor IMU M0 Hookup Guide

Pages
Contributors: jimblom
Favorited Favorite 7

Installing the 9DoF Razor Arduino Core

The 9DoF Razor IMU M0 is designed around the SAMD21 -- the same processor on the Arduino Zero -- which means adding Arduino support for the board is just a few clicks away. This section describes the steps you'll need to take to install the SAMD cores into your Arduino library (that sounds scarier than it actually is).

Update Arduino! This setup requires at least Arduino version 1.6.4 or later. We've tested it on 1.6.12, and would recommend that version of the IDE. If you're running an older version of Arduino, consider visiting arduino.cc to get the latest, greatest release.

Install Arduino SAMD Boards

First, you'll need to install a variety of tools, including low-level ARM Cortex libraries full of generic code, arm-gcc to compile your code, and bossa to upload code via the bootloader. These tools come packaged along with Arduino's SAMD board definitions for the Arduino Zero.

To install the Arduino SAMD board definitions, navigate to your board manager (Tools > Board > Boards Manager...), then find an entry for Arduino SAMD Boards (32-bits ARM Cortex-M0+). Select it, and install the latest version (recently updated to 1.6.8).

Installing the Arduino SAMD boards

Downloading and installing the tools may take a couple minutes -- arm-gcc in particular will take the longest, it's about 250MB unpacked.

Once installed, Arduino-blue "Installed" text should appear next to the SAMD boards list entry.

Install SparkFun Board Definition

Now that your ARM tools are installed, one last bit of setup is required to add support for the SparkFun SAMD boards. First, open your Arduino preferences (File > Preferences). Then find the Additional Board Manager URLs text box, and paste the below link in:

https://raw.githubusercontent.com/sparkfun/Arduino_Boards/master/IDE_Board_Manager/package_sparkfun_index.json

Adding the board manager link

Then hit "OK", and travel back to the Board Manager menu. You should be able to find a new entry for SparkFun SAMD Boards.

Installing the SparkFun SAMD Boards

This installation should be much faster; you've already done the heavy lifting in the previous section.

Select the Board and Serial Port

Once the board is installed, you should see a few new entries in your Tools > Board list, including SparkFun 9DoF Razor IMU M0, under the "SparkFun SAMD (32-bits ARM Cortex-M0+) Boards" menu.

Selecting the SparkFun 9DoF Razor IMU M0

Finally, select your 9DoF Razor's port, by navigating back up to the Tools > Port menu.

Selecting the port in Arduino

In the next section, we'll load up the example firmware, so you can customize it and build upon it as you create your own motion-sensing project.

Troubleshooting

If your 9DoF Razor IMU won’t enter the bootloader, or take new code, you can force it into the bootloader by holding the SCL pin LOW on start up. Flip the IMU’s switch off, use a jumper wire to connect SCL to GND, and turn the switch back on. While in the bootloader, the blue pin 13 LED should remain illuminated.