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: Motor.cpp
- Revision:
- 1:041f0a1fc2e5
- Parent:
- 0:18e417fff669
diff -r 18e417fff669 -r 041f0a1fc2e5 Motor.cpp
--- a/Motor.cpp Fri Mar 13 08:18:24 2015 +0000
+++ b/Motor.cpp Wed Mar 18 07:59:21 2015 +0000
@@ -112,3 +112,8 @@
// PI controller!
motor->write(kp * delta_spd + ki * (*iState));
}
+
+void toggle_brake(DigitalOut *brake)
+{
+ brake->write(!brake->read());
+}
\ No newline at end of file