TrekkingPhoenix / Mbed 2 deprecated TrekkingControllerV1-4_WinterChallenge20

Dependencies:   mbed mbed-rtos MotionSensor EthernetInterface

Revision:
9:bd0fb9d17803
Parent:
0:88faaa1afb83
Child:
12:273752f540be
--- a/SensorsLibrary/FXAS21002.h	Mon Apr 11 05:51:34 2016 +0000
+++ b/SensorsLibrary/FXAS21002.h	Sat Apr 30 12:57:17 2016 -0300
@@ -28,6 +28,21 @@
 #define FXAS21002_CTRL_REG1 0x13
 #define FXAS21002_WHO_AM_I_VALUE 0xD1
 
+/*  Gyroscope mechanical modes
+*   Mode    Full-scale range [Deg/s]    Sensitivity [(mDeg/s)/LSB]
+*   1       +- 2000                     62.5
+*   2       +- 1000                     31.25
+*   3       +- 500                      15.625
+*   4       +- 250                      7.8125
+*/
+enum gyro_mode
+{
+    MODE_1 = 0x00, 
+    MODE_2 = 0x01,
+    MODE_3 = 0x02,
+    MODE_4 = 0x03
+}
+
 class FXAS21002
 {
     public:
@@ -35,12 +50,13 @@
     FXAS21002(PinName sda, PinName scl);
       
     void gyro_config(void);
+    void gyro_config(gyro_mode mode);
         
     void acquire_gyro_data_dps(float * du);
     
     private:
     I2C gyroi2c;
-    
+    float sensivity;
 };
 
 #endif
\ No newline at end of file