The current example Arduino sketches are available on Github as part of the Adafruit AHRS libray
Downloading the AHRS Sample Code
To install the drivers and AHRS sketch for your breakout, you simply need to install the Adafruit_AHRS
library and it's dependencies on your PC (the exact dependencies you choose will depend on which IMU board you are currently using).
We've put together a tutorial showing you everything you need to do to install dependent libraries if you're just getting started with your breakout. Follow the guide below to install the right libraries depending on which board you are using:
In addition to the dependencies above, make sure to install the Adafruit_AHRS
library. You can find a link to download the library below:
If you aren't familiar with how to install an Arduino library, check out this guide on installing libraries.
Loading the Sample Sketch
Once the repository has been added to your libraries folder ("/libraries/Adafruit_AHRS/", etc.) you should be able to access the AHRS examples from 'File > Examples > Adafruit_AHRS' in the Arduino IDE. There should be an ahrs_9dof
, and ahrs_lsm9ds0
Pick the appropriate example for your board, for example the ahrs_10dof
example should be used with the 10-DOF
If you compile the sketch and then program your Uno with the code, you should be able to open up the Serial Monitor (Tools > Serial Monitor), set the baud rate to 115200, and see the following output: