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 HIDScope QEI biquadFilter
Diff: main.cpp
- Revision:
- 0:1b2c842eca42
- Child:
- 1:afb820c6fc0d
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Mon Oct 22 12:25:04 2018 +0000
@@ -0,0 +1,43 @@
+#include "mbed.h"
+
+enum State(PositionCalibration, EmgCalibration, Movement, KILL);
+
+int main()
+{
+ State = PositionCalibration;
+
+ while (true) {
+ switch(States) {
+ case PositionCalibration:
+ if (!KillSwitch) {
+ State = KILL;
+ Break;
+ }
+
+ Break;
+
+ case EmgCalibration:
+ if (!KillSwitch) {
+ State = KILL;
+ Break;
+ }
+
+ Break;
+
+ case Movement:
+ if (!KillSwitch) {
+ State = KILL;
+ Break;
+ }
+
+ Break;
+
+ case KILL:
+ turnoffmotors() //placeholder
+ flashsos() //placeholder
+ if (!KillSwitch){
+ State = PositionCalibration;
+ }
+ Break;
+ }
+}
\ No newline at end of file