Proyecto Nivel, Edgar Ochoa, Erik Garcia

Dependencies:   MMA8451Q mbed

Revision:
36:2bc74f4ce17b
Parent:
35:60b29a00cf12
Child:
40:f8ae692fbe76
diff -r 60b29a00cf12 -r 2bc74f4ce17b versionerik.h
--- a/versionerik.h	Sun Feb 14 20:57:56 2016 +0000
+++ b/versionerik.h	Mon Feb 15 03:31:21 2016 +0000
@@ -2,7 +2,7 @@
 #define versionerik
 #include "mbed.h"
 
-void erik_nivel(){
+void erik_nivel(){ //esto ya jala chido, no modificar ;)
     
        /* r = 1.0 - abs(data[0]/16500.0);
         g = 1.0 - abs(data[1]/16500.0);
@@ -16,9 +16,9 @@
         
         
     
-    if(350<data[1] && data[1]>150 && data[0]<-200 && data[0]>-320 && data[2]>16100 && data[2]<=16300){
+    if( data[0]<320 && data[0]>=-200 && 1100>data[1] && data[1]>600 &&  data[2]>16000 && data[2]<=16290){
         pc.printf("Nivel estable\n");
-        wait (0.4);
+        //wait (0.4);
         b=0;
         g=1;
         r=1;
@@ -28,7 +28,7 @@
             r=0;
             }
             
-        wait(0.1);
+        wait(0.001);
         
     }