Robot code for searching an object and charging at it.
Dependencies: HCSR04 Motor mbed
Revision 38:decff231d886, committed 2016-10-12
- Comitter:
- alex0612
- Date:
- Wed Oct 12 14:58:55 2016 +0000
- Parent:
- 37:a08d2e37b7e6
- Commit message:
- added breaks to cases
Changed in this revision
functions.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r a08d2e37b7e6 -r decff231d886 functions.cpp --- a/functions.cpp Wed Oct 12 11:13:45 2016 +0000 +++ b/functions.cpp Wed Oct 12 14:58:55 2016 +0000 @@ -34,18 +34,22 @@ myled1 = 1; wait(0.1); myled1 = 0; + break; case 2: myled2 = 1; wait(0.1); myled2 = 0; + break; case 3: myled3 = 1; wait(0.1); myled3 = 0; + break; case 4: myled4 = 1; wait(0.1); myled4 = 0; + break; } }