Skip to content

kragniz/CMPS10

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CMPS10-arduino

Library to read data from a CMPS10 tilt-compensating compass with an Arduino.

Installing

Clone this repository

$ git clone https://github.com/kragniz/CMPS10.git

Copy the files into the Arduino library directory

$ cp -r CMPS10 ~/sketchbook/libraries/CMPS10

Then restart the Arduino IDE.

Usage

axes

To use this library, include the header file:

#include <CMPS10.h>

Then create an instance of the compass

CMPS10 my_compass;

You can now access the bearing of the compass with

my_compass.bearing();

Methods

Return the bearing in degrees as a float, 0-359.9:

float bearing()

Return the bearing as a byte, 0-255:

int bearing_byte()
int8_t pitch()

int8_t roll()

Return the overall acceleration on the accelerometer, measured in units of g.

float acceleration()

Return the acceleration in each of the three axis.

float acceleration_x()

float acceleration_y()

float acceleration_z()

License

This code is released under the terms of the LGPLv3 license. See COPYING for more details.

About

Arduino library for the CMPS10 compass

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages