Code to let Gr20's BioRobotics2017 robot come to live.
Dependencies: FastPWM MODSERIAL QEI mbed
ui.h
- Committer:
- megrootens
- Date:
- 2017-11-13
- Revision:
- 7:b9a209f889f5
- Parent:
- 5:088917beb5e4
- Child:
- 8:383a0fb48121
File content as of revision 7:b9a209f889f5:
#ifndef _UI_H_ #define _UI_H_ #include "MODSERIAL.h" #define LED_ON 0 /** * User interface */ namespace ui { // Sample time static const double kSampleTime = 0.5; // UI states enum State { IGNORE, STATE_SWITCHING, ROBOT_CONTROL }; // UI state description static const char *StateNames[] = { "Ignore user input", "State switching", "Control robot" }; // Change state void SwitchState(State new_state); // Current state extern State state; // LEDs and Serial extern DigitalOut rgb_led[]; extern MODSERIAL serial; // Interrupt switches void InterruptSwitch2(); void InterruptSwitch3(); // Display robot status through LEDs void StatusDisplay(); } #endif