Skip to content

nicholasrobinson/LSM9DS0_AHRS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LSM9DS0 AHRS Driver for Arduino

by Nicholas Robinson

Overview

An AHRS driver leveraging the LSM9DS0 library and AHRS example code from sparkfun (https://github.com/sparkfun/LSM9DS0_Breakout).

The LSM9DS0 iNEMO inertial module features a 3D digital linear acceleration sensor, and a 3D digital angular rate sensor, a 3D digital magnetic sensor. This driver allows simple access to AHRS yaw, pitch and roll calculated using Sebastian Madgwick and Robert Mayhony’s orientation filters.

Usage

#include <SFE_LSM9DS0.h>
#include <LSM9DS0_AHRS.h>

LSM9DS0_AHRS* ahrs;

void setup()
{ 
  ahrs = new LSM9DS0_AHRS(MADGWICK);
  // Can also be invoked:
  // ahrs = new LSM9DS0_AHRS(MAHONY);
}

void loop()
{ 
  ahrs->update();
  
  // YOUR_STUFF
  // raw, pitch and roll available with:
  // ahrs->yaw, ahrs->pitch and ahrs->roll
}

Requirements

Tested On

Arduino R3 (https://www.sparkfun.com/products/11021), with:

About

Arduino AHRS for LSM9DS0 using Madgwick/Mohony filter

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages