Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: MMA8451Q Servo mbed
Revision 2:d07fe9f3d109, committed 2016-02-26
- Comitter:
- fdopc
- Date:
- Fri Feb 26 16:15:53 2016 +0000
- Parent:
- 1:e3a0298156ed
- Child:
- 3:c8e9a933acd2
- Commit message:
- All
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- 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;