Code to let Gr20's BioRobotics2017 robot come to live.

Dependencies:   FastPWM MODSERIAL QEI mbed

Revision:
0:caa8ee3bd882
Child:
2:df0c6af898ac
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ui.h	Sun Nov 12 00:14:05 2017 +0000
@@ -0,0 +1,37 @@
+#include "MODSERIAL.h"
+
+#define LED_ON 0
+
+/**
+ * User interface
+ */
+namespace ui
+{
+
+enum State {
+    IGNORE,
+    STATE_SWITCHING,
+    ROBOT_CONTROL
+};
+
+const char *StateNames[] = {
+    "Ignore user input",
+    "State switching",
+    "Control robot"
+};
+
+void SwitchState(State new_state);
+
+State state = IGNORE;
+
+const double kSampleTime = 0.5;
+
+DigitalOut rgb_led[] {LED_RED, LED_GREEN, LED_BLUE};
+
+MODSERIAL serial(USBTX,USBRX);
+
+void InterruptSwitch2();
+void InterruptSwitch3();
+
+void StatusDisplay();
+}
\ No newline at end of file