Proyecto Nivel, Edgar Ochoa, Erik Garcia

Dependencies:   MMA8451Q mbed

Revision:
21:88761ef02671
Parent:
20:19b719b6dcdc
diff -r 19b719b6dcdc -r 88761ef02671 Ochoa.h
--- a/Ochoa.h	Fri Feb 12 13:38:04 2016 +0000
+++ b/Ochoa.h	Fri Feb 12 14:01:53 2016 +0000
@@ -2,9 +2,19 @@
 #define OCHOA
 
 #include "mbed.h"
-
-        r = 1.0 - abs(data[0]/16500.0);
-        g = 1.0 - abs(data[1]/16500.0);
-        b = 1.0 - abs(data[2]/16500.0);
-        
+void_Mensajes(){
+        if(150<data[1] && data[1]440>){
+            pc.printf("Nivel estable");}
+        if(0=<data[1] && data[1]>=-16000){
+            pc.prinft("Nivel a la derecha");}
+        if(0=<data[1] && data[1]>=16000){
+            pc.prinft("Nivel a la izquierda");}
+            
+            if(-36=<data[0] && data[0]>=16000){
+            pc.prinft("Nivel hacia adelante");}
+            if(0=<data[0] && data[0]>=-16000){
+            pc.prinft("Nivel hacia atras");}
+        if(data[b]
+        //150-432
+        }
 #endif
\ No newline at end of file