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
clickers.cpp@0:cfb1fcccadd6, 2020-02-10 (annotated)
- Committer:
- Mikebob
- Date:
- Mon Feb 10 10:54:40 2020 +0000
- Revision:
- 0:cfb1fcccadd6
- Child:
- 1:d5b76569b45c
new file
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| Mikebob | 0:cfb1fcccadd6 | 1 | #include "mbed.h" |
| Mikebob | 0:cfb1fcccadd6 | 2 | #include "motor.h" |
| Mikebob | 0:cfb1fcccadd6 | 3 | #include "clickers.h" |
| Mikebob | 0:cfb1fcccadd6 | 4 | |
| Mikebob | 0:cfb1fcccadd6 | 5 | extern DigitalIn microswitch1; //Instance of the DigitalIn class called 'microswitch1' |
| Mikebob | 0:cfb1fcccadd6 | 6 | extern DigitalIn microswitch2; //Instance of the DigitalIn class called 'microswitch2' |
| Mikebob | 0:cfb1fcccadd6 | 7 | extern Motor Wheel; |
| Mikebob | 0:cfb1fcccadd6 | 8 | void RevStop() |
| Mikebob | 0:cfb1fcccadd6 | 9 | { |
| Mikebob | 0:cfb1fcccadd6 | 10 | microswitch1.read(); |
| Mikebob | 0:cfb1fcccadd6 | 11 | while (microswitch1 == true) |
| Mikebob | 0:cfb1fcccadd6 | 12 | { |
| Mikebob | 0:cfb1fcccadd6 | 13 | microswitch1.read(); |
| Mikebob | 0:cfb1fcccadd6 | 14 | Wheel.Stop(); |
| Mikebob | 0:cfb1fcccadd6 | 15 | } |
| Mikebob | 0:cfb1fcccadd6 | 16 | } |