Vince et Yann / Mbed 2 deprecated APP1_customProtocole

Dependencies:   mbed

Fork of APP1_customProtocole by Yann Lemay-Sévigny

Files at this revision

API Documentation at this revision

Comitter:
yannolecool
Date:
Tue Jan 12 20:28:24 2016 +0000
Parent:
6:5c8e02d5ebcc
Commit message:
Code final comment? avec UART custom

Changed in this revision

acceleroMMA8452Q.cpp Show annotated file Show diff for this revision Revisions of this file
customUART.cpp Show annotated file Show diff for this revision Revisions of this file
--- 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);
 }
 
--- a/customUART.cpp	Mon Jan 11 20:01:34 2016 +0000
+++ b/customUART.cpp	Tue Jan 12 20:28:24 2016 +0000
@@ -1,3 +1,8 @@
+/*
+APP1 S5 info
+Author : lemy2301 and gagv2103
+*/
+
 #include "customUART.h"
 
 CustomUART::CustomUART()