A hello world for inertial sensors

Dependencies:   FXAS21000 FXOS8700Q mbed

Fork of FRDM-STBC-AGM01 by angus taggart

Committer:
Elecia
Date:
Tue Jun 30 16:23:32 2015 +0000
Revision:
4:5ab2bb2f062b
Parent:
3:123b546e4a5c
Added element14 link

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Elecia 3:123b546e4a5c 1 /***************************************************************************
Elecia 3:123b546e4a5c 2 ** https://github.com/adafruit/Adafruit_9DOF/blob/master/Adafruit_9DOF.h
Elecia 3:123b546e4a5c 3 ** Modifed Adafruit's orientation code to get tilt compensated heading
Elecia 3:123b546e4a5c 4 ** This header provides the interface to to that.
Elecia 3:123b546e4a5c 5 ***************************************************************************/
Elecia 3:123b546e4a5c 6 #include <stdint.h>
Elecia 3:123b546e4a5c 7
Elecia 3:123b546e4a5c 8 #define NUM_AXIS 3
Elecia 3:123b546e4a5c 9 #define X 0
Elecia 3:123b546e4a5c 10 #define Y 1
Elecia 3:123b546e4a5c 11 #define Z 2
Elecia 3:123b546e4a5c 12
Elecia 3:123b546e4a5c 13 typedef struct {
Elecia 3:123b546e4a5c 14 float roll;
Elecia 3:123b546e4a5c 15 float pitch;
Elecia 3:123b546e4a5c 16 float heading;
Elecia 3:123b546e4a5c 17 } tOrientation;
Elecia 3:123b546e4a5c 18
Elecia 3:123b546e4a5c 19 bool fusionGetOrientation(int16_t accel[], int16_t mag[], tOrientation *orientation);
Elecia 3:123b546e4a5c 20
Elecia 3:123b546e4a5c 21 #ifndef NULL
Elecia 3:123b546e4a5c 22 #define NULL 0
Elecia 3:123b546e4a5c 23 #endif // NULL