Edgar Ochoa
/
ProyectoNivel
Proyecto Nivel, Edgar Ochoa, Erik Garcia
versionerik.h@36:2bc74f4ce17b, 2016-02-15 (annotated)
- Committer:
- through
- Date:
- Mon Feb 15 03:31:21 2016 +0000
- Revision:
- 36:2bc74f4ce17b
- Parent:
- 35:60b29a00cf12
- Child:
- 40:f8ae692fbe76
modicaci?n luces, ya quedaron
Who changed what in which revision?
User | Revision | Line number | New 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 | 36:2bc74f4ce17b | 5 | void erik_nivel(){ //esto ya jala chido, no modificar ;) |
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 | 36:2bc74f4ce17b | 19 | if( data[0]<320 && data[0]>=-200 && 1100>data[1] && data[1]>600 && data[2]>16000 && data[2]<=16290){ |
verden32 | 35:60b29a00cf12 | 20 | pc.printf("Nivel estable\n"); |
through | 36:2bc74f4ce17b | 21 | //wait (0.4); |
through | 22:de1ab79df237 | 22 | b=0; |
through | 22:de1ab79df237 | 23 | g=1; |
through | 22:de1ab79df237 | 24 | r=1; |
through | 22:de1ab79df237 | 25 | }else{ |
through | 22:de1ab79df237 | 26 | b=1; |
through | 22:de1ab79df237 | 27 | g=1; |
through | 22:de1ab79df237 | 28 | r=0; |
through | 22:de1ab79df237 | 29 | } |
through | 22:de1ab79df237 | 30 | |
through | 36:2bc74f4ce17b | 31 | wait(0.001); |
through | 22:de1ab79df237 | 32 | |
through | 16:7e0223097f77 | 33 | } |
through | 16:7e0223097f77 | 34 | |
through | 10:76ab6531ba6f | 35 | #endif |