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.
Dependencies: mbed-rtos mbed PinDetect
Fork of FinalMotorControl by
Revision 18:ef02a9014491, committed 2016-04-26
- Comitter:
- mjhaugsdal
- Date:
- Tue Apr 26 14:29:08 2016 +0000
- Parent:
- 17:ff0021c4dcdc
- Child:
- 19:79600d3509d7
- Commit message:
- Made a stop case that sets all pins to 0
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue Apr 26 14:25:29 2016 +0000
+++ b/main.cpp Tue Apr 26 14:29:08 2016 +0000
@@ -261,6 +261,22 @@
wait_us(fart);
}
+void stopAll()
+{
+ IN1=0;
+ IN2=0;
+ IN3=0;
+ IN4=0;
+ IN5=0;
+ IN6=0;
+ IN7=0;
+ IN8=0;
+ IN9=0;
+ IN10=0;
+ IN11=0;
+ IN12=0;
+}
+
void input(void const *args)
@@ -371,6 +387,10 @@
m_cmd = 'x';
}
+ if (m_cmd == 'z')
+ {
+ stopAll();
+ }
