Library for accelerometer and SysClean

Committer:
jotamo
Date:
Wed Oct 19 20:44:59 2016 +0000
Revision:
2:f9ddabfe2eb6
Parent:
1:55d35606b477
Final version of BMI160 accelerometer library

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jotamo 0:362698102bff 1 /* mbed library for the mbed BMI160 accelerometer
jotamo 0:362698102bff 2 Author: Josias Marcos Orlando
jotamo 0:362698102bff 3 Organization: SysClean Solutions
jotamo 0:362698102bff 4 */
jotamo 0:362698102bff 5
jotamo 0:362698102bff 6 #ifndef BMI160_H
jotamo 0:362698102bff 7 #define BMI160_H
jotamo 0:362698102bff 8
jotamo 0:362698102bff 9 #include "mbed.h"
jotamo 0:362698102bff 10
jotamo 0:362698102bff 11 class BMI160{
jotamo 0:362698102bff 12 public:
jotamo 2:f9ddabfe2eb6 13 /*configureAccelerometer() setup and configure accelerometer BMI160*/
jotamo 2:f9ddabfe2eb6 14 void configureAccelerometer();
jotamo 2:f9ddabfe2eb6 15
jotamo 2:f9ddabfe2eb6 16 /*readAccelerometer() read and calculate angle with accelerometer*/
jotamo 0:362698102bff 17 void readAccelerometer();
jotamo 2:f9ddabfe2eb6 18
jotamo 2:f9ddabfe2eb6 19 /**
jotamo 2:f9ddabfe2eb6 20 * getAngle() return the angle calculated with accelerometer
jotamo 2:f9ddabfe2eb6 21 * Reference is top of the LPCXpresso(headers side) poiting bottom of container
jotamo 2:f9ddabfe2eb6 22 *
jotamo 2:f9ddabfe2eb6 23 * @return 0 when in the referential position(Closed cover)
jotamo 2:f9ddabfe2eb6 24 * @return 90 when 90 degrees from referential
jotamo 2:f9ddabfe2eb6 25 * @return 180 when 180 degrees from referential
jotamo 2:f9ddabfe2eb6 26 * @return 270 when 270 degrees from referential
jotamo 2:f9ddabfe2eb6 27 * @return -1 when error
jotamo 2:f9ddabfe2eb6 28 */
jotamo 2:f9ddabfe2eb6 29 int getAngle();
jotamo 0:362698102bff 30 };
jotamo 0:362698102bff 31
jotamo 0:362698102bff 32
jotamo 0:362698102bff 33 #endif