Skip to content
This repository has been archived by the owner on Sep 27, 2018. It is now read-only.

Propulsion Microcontroller API

Anthony Randell edited this page Dec 9, 2016 · 22 revisions

This page contains the commands used when communicating to and from the Wireless Communication Modules.

More details about the communication protocol can be found via the API Documentation Homepage.


Command 0x10 – Reset Motor Controller

Request Message:

  • Payload Size: 1 byte (null)

Response Message:

  • Payload Size: 1 byte

Command 0x11 – Set Motor Controller Configuration

Request Message:

  • Payload Size: 2 bytes
Byte Description Valid Range
0 Register to Modify See Qik 2s12v10 User Guide parameter numbers
1 New Configuration See Qik 2s12v10 User Guide parameter allowed values

Response Message:

  • Payload Size: 2 bytes
Byte Description Valid Range
0 Register that was Set See Qik 2s12v10 User Guide
1 New Configuration Value Varies

Command 0x12 – Get Motor Controller Configuration

Request Message:

  • Payload Size: 1 byte
Byte Description Valid Range
0 Register to Read See Qik 2s12v10 User Guide

Response Message:

  • Payload Size: 2 bytes
Byte Description Valid Range
0 Register that was Read See Qik 2s12v10 User Guide
1 Value in Register Varies

Command 0x13 – Set Motor Speeds

Request Message:

  • Payload Size: 8 bytes
  • Used to set the speed of both motors simultaneously

Response Message:

  • Payload Size: 8 bytes
  • The response from the microcontroller to a set motor speed is to reply with the new motor speed to confirm the set was successful
Byte Description Valid Range
0 to 3 M0 Speed (MSB) Integer -255 to 255
4 to 7 M1 Speed (MSB) Integer -255 to 255

Command 0x14 - Get Motor Currents

Request Message:

  • Payload Size: 1 byte (null)
  • Used to request the current being consumed by both motors.

Response Message:

  • Payload size: 8 bytes
  • Reply from the microcontroller contains the current of both motors in milliamps.
Byte Description Valid Range
0 to 3 M0 Current Integer > 0
4 to 7 M1 Current Integer > 0

Command 0x15 – Get Errors

Request Message:

  • Payload Size: 1 byte (null)
  • Requests the errors currently active on the device.
  • Note: The act of reading the errors will clear them from the device.

Response Message:

The table below explains the individual bit meanings of the single byte of the payload.

Bit Description Valid Range
7 (MSB) Timeout 0 or 1
6 Format Error 0 or 1
5 CRC Error 0 or 1
4 Serial Hardware Error 0 or 1
3 Motor 1 Over Current 0 or 1
2 Motor 0 Over Current 0 or 1
1 Motor 1 Fault 0 or 1
0 (LSB) Motor 0 Fault 0 or 1