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.
Dependents: ROCO104_Buggy BuggyDesign
Movement.cpp@0:0285394cacfa, 2020-03-06 (annotated)
- Committer:
- jakesmart
- Date:
- Fri Mar 06 16:55:04 2020 +0000
- Revision:
- 0:0285394cacfa
- Child:
- 1:401bcbb58715
Started movement functions.
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| jakesmart | 0:0285394cacfa | 1 | #include "mbed.h" |
| jakesmart | 0:0285394cacfa | 2 | #include "motor.h" |
| jakesmart | 0:0285394cacfa | 3 | #include "UltraSonic.h" |
| jakesmart | 0:0285394cacfa | 4 | #include "clickers.h" |
| jakesmart | 0:0285394cacfa | 5 | |
| jakesmart | 0:0285394cacfa | 6 | void Direction (){ |
| jakesmart | 0:0285394cacfa | 7 | while(fStopped == false){ |
| jakesmart | 0:0285394cacfa | 8 | Wheel.Speed(1.0,1.0);//forward 100% |
| jakesmart | 0:0285394cacfa | 9 | FwdStop(); |
| jakesmart | 0:0285394cacfa | 10 | } |
| jakesmart | 0:0285394cacfa | 11 | |
| jakesmart | 0:0285394cacfa | 12 | while(fStopped == true && rStopped == false){ |
| jakesmart | 0:0285394cacfa | 13 | Wheel.Speed(-1.0,-1.0);//forward 100% |
| jakesmart | 0:0285394cacfa | 14 | RevStop(); |
| jakesmart | 0:0285394cacfa | 15 | } |
| jakesmart | 0:0285394cacfa | 16 | } |