Vince et Yann / Mbed 2 deprecated APP1_customProtocole

Dependencies:   mbed

Fork of APP1_customProtocole by Yann Lemay-Sévigny

Revision:
7:7424c51ee942
Parent:
6:5c8e02d5ebcc
--- a/acceleroMMA8452Q.cpp	Mon Jan 11 20:01:34 2016 +0000
+++ b/acceleroMMA8452Q.cpp	Tue Jan 12 20:28:24 2016 +0000
@@ -6,7 +6,7 @@
 #include "acceleroMMA8452Q.h"
 #include "math.h"
 
-#define CONVERT_FACTOR 5729.57795131
+#define CONVERT_FACTOR 5729.57795131 // 360/(2*PI) * 100
 
 Accelero::Accelero(int frequency): i2cPort(p28, p27)
 {
@@ -39,13 +39,13 @@
     
     //Change the power mode
     command[0] = ACCELERO_REGISTER_CTRL_REG2;
-    command[1] = 0b11;
+    command[1] = 0b10;
     i2cPort.write(ACCELERO_WRITE_ADRESS, command, 2, false);
     
     //Put the accelerometer in active mode
-    //Change the data rate selection to 12.5Hz
+    //Change the data rate selection to 6.25Hz
     command[0] = ACCELERO_REGISTER_CTRL_REG1;
-    command[1] = (0b101 << 3) | 0b1;
+    command[1] = (0b110 << 3) | 0b1;
     i2cPort.write(ACCELERO_WRITE_ADRESS, command, 2, false);
 }