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 inputresult
joystick throttle up/dnlift up/down
joystick left/rightroll up/down
joystick forward/backwardpitch down/up
joystick twist clockwise/counter-clockwiseyaw up/down
joystick fire buttonabort/exit

The other buttons can be used at one’s own discretion.

Keyboard map

keyresult
ESC, SPACE BARgo to safe mode, through panic mode
0Safe mode
1Panic mode
numbersetc. (random access)
a/ztrim throttle up/down
left/right arrowtrim roll up/down
up/down arrowtrim pitch down/up (cf. stick)
q/wtrim yaw down/up
u/jtrim yaw control P up/down
i/kroll/pitch control P up/down
o/lroll/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.