MBED code for electronics project: telemetry, shifting, etc