Interface Requirements
The following prescribes the minimum interface requirements. Apart from these requirements, appropriate on-screen feedback on drone and embedded systems performance earns credits.
Joystick map
joystick input | result |
---|---|
joystick throttle up/dn | lift up/down |
joystick left/right | roll up/down |
joystick forward/backward | pitch down/up |
joystick twist clockwise/counter-clockwise | yaw up/down |
joystick fire button | abort/exit |
The other buttons can be used at one’s own discretion.
Keyboard map
key | result |
---|---|
ESC, SPACE BAR | go to safe mode, through panic mode |
0 | Safe mode |
1 | Panic mode |
numbers | etc. (random access) |
a/z | trim throttle up/down |
left/right arrow | trim roll up/down |
up/down arrow | trim pitch down/up (cf. stick) |
q/w | trim yaw down/up |
u/j | trim yaw control P up/down |
i/k | roll/pitch control P up/down |
o/l | roll/pitch control D up/down |
The keyboard controls for lift, roll, pitch and yaw should act as a fixed offset to the joysticks input. This is useful to correct any small deviation your drone may have. If your joystick throttle is all the way down, then the motors should be turned off, even if your throttle trim is non-zero. The full control P and D control parameters simultaneously apply to both the pitch and roll cascaded P controllers, which are identical. The other keys can be used at own discretion.
Led indicators
Blue LED: blink at a 1s rate to indicate the program is running properly
The remaining LEDs can be used at one’s own discretion (typically used for status/debugging).
In the template, the mapping of the leds is as follows:
- red blinking: you probably have a panic
- blue blinking: your code is probably running fine
- yellow on + red blinking: this happens during initialization. If initialization fails, this is never turned off. If a panic happens and yellow is on, initialization likely failed
- green on + red blinking: an allocation happened causing a panic.