Code to let Gr20's BioRobotics2017 robot come to live.
Dependencies: FastPWM MODSERIAL QEI mbed
Diff: ui.h
- Revision:
- 2:df0c6af898ac
- Parent:
- 0:caa8ee3bd882
- Child:
- 5:088917beb5e4
diff -r ff11ee1c6baa -r df0c6af898ac ui.h --- a/ui.h Sun Nov 12 12:05:22 2017 +0000 +++ b/ui.h Sun Nov 12 14:06:23 2017 +0000 @@ -4,34 +4,42 @@ /** * User interface + * + * Implementation can be found in main.cpp */ namespace ui { +// Sample time +const double kSampleTime = 0.5; +// UI states enum State { IGNORE, STATE_SWITCHING, ROBOT_CONTROL }; +// UI state description const char *StateNames[] = { "Ignore user input", "State switching", "Control robot" }; +// Change state void SwitchState(State new_state); +// Current state State state = IGNORE; -const double kSampleTime = 0.5; - +// LEDs and Serial DigitalOut rgb_led[] {LED_RED, LED_GREEN, LED_BLUE}; - MODSERIAL serial(USBTX,USBRX); +// Interrupt switches void InterruptSwitch2(); void InterruptSwitch3(); +// Display robot status through LEDs void StatusDisplay(); -} \ No newline at end of file +}