ejemplo taller prepa tec
Dependencies: MMA8451Q Servo mbed
Diff: main.cpp
- Revision:
- 2:d07fe9f3d109
- Parent:
- 1:e3a0298156ed
- Child:
- 3:c8e9a933acd2
--- a/main.cpp Fri Feb 26 16:12:43 2016 +0000 +++ b/main.cpp Fri Feb 26 16:15:53 2016 +0000 @@ -57,12 +57,22 @@ green=1; blue=0; } + if(TSILec>0.5 && TSILec<0.75) { + red=1; + green=0; + blue=1; + } + if(TSILec>0.75) { + red=0; + green=1; + blue=1; + } Motor1=TSILec; //Assign touch read to motor wait(0.1); } //Read Accel else{ - x=acc.getAccX(); + x=acc.getAccX(); y=acc.getAccY(); z=acc.getAccZ(); red=x;