Proyecto Nivel, Edgar Ochoa, Erik Garcia

Dependencies:   MMA8451Q mbed

Committer:
through
Date:
Fri Feb 12 14:39:15 2016 +0000
Revision:
24:0de2f491c212
Parent:
22:de1ab79df237
Child:
30:1673abc35fd7
Child:
31:c826879795d4
Child:
32:4ff13543bbe4
version erik 4

Who changed what in which revision?

UserRevisionLine numberNew contents of line
through 10:76ab6531ba6f 1 #ifndef versionerik
through 10:76ab6531ba6f 2 #define versionerik
through 10:76ab6531ba6f 3 #include "mbed.h"
through 10:76ab6531ba6f 4
through 17:11ceb54a2e7d 5 void erik_nivel(){
through 17:11ceb54a2e7d 6
through 22:de1ab79df237 7 /* r = 1.0 - abs(data[0]/16500.0);
through 17:11ceb54a2e7d 8 g = 1.0 - abs(data[1]/16500.0);
through 17:11ceb54a2e7d 9 b = 1.0 - abs(data[2]/16500.0);
through 17:11ceb54a2e7d 10
through 16:7e0223097f77 11
through 17:11ceb54a2e7d 12 pc.printf("%d,%d,%d,\n",data[0],data[1],data[2]);
through 17:11ceb54a2e7d 13
through 17:11ceb54a2e7d 14 wait(0.4);
through 22:de1ab79df237 15 */
through 17:11ceb54a2e7d 16
through 17:11ceb54a2e7d 17
through 22:de1ab79df237 18
through 24:0de2f491c212 19 if(data[2]>16020 && data[2]<16400 && data[0]>-150 && data[0]<2 && data[1]>150 && data[1]<350){
through 22:de1ab79df237 20 b=0;
through 22:de1ab79df237 21 g=1;
through 22:de1ab79df237 22 r=1;
through 22:de1ab79df237 23 }else{
through 22:de1ab79df237 24 b=1;
through 22:de1ab79df237 25 g=1;
through 22:de1ab79df237 26 r=0;
through 22:de1ab79df237 27 }
through 22:de1ab79df237 28
through 22:de1ab79df237 29
through 22:de1ab79df237 30
through 16:7e0223097f77 31 }
through 16:7e0223097f77 32
through 10:76ab6531ba6f 33 #endif