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.
Diff: main.cpp
- Revision:
- 2:9a3221b22855
- Parent:
- 1:5265e3a6f3d7
- Child:
- 3:c9e09e968552
--- a/main.cpp Wed Dec 07 20:36:22 2016 +0000 +++ b/main.cpp Wed Dec 07 20:46:37 2016 +0000 @@ -21,11 +21,11 @@ int Rtot=0; int Ltot=0; char c; -int pics = 0; +int targets = 0; int TError = 0; char V; char M; - +int current = 1; Ticker Sampler; @@ -121,6 +121,7 @@ } else if (Instr == 5) { + for (current < targets+1){ LMotor.speed(0); RMotor.speed(0); wait(.2); @@ -146,8 +147,12 @@ wait(1);//snap tons of photos LMotor.speed(-Lspeed); RMotor.speed(-Rspeed); + wait(1); + current = targets+1; //if a match is found, stops the search } + else current++; } + Instr = 0; //turns status to stop after search /* switch (Instr){