Skip to content

Protocol

Johannes Ernstsen edited this page Mar 17, 2021 · 2 revisions

Communications Protocol

This entry outlines the protocol used in communicating with the micro-controller.

The communication is through a standard serial-connection, through the board USB port.

After receiving a command with arguments, the arguments is then read in the order listed in the table. The command is requested by sending its Character through the connection.

Note that some intervals are dependent on the vehicle i.e. gear and throttle.

Command Character Argument Description
setDrive D val: 0/1 Requests whether vehicle should be in high/low drive
setGear G val: gear Requests the gear the vehicle should be in
setThrottle P val: 0/10 Requests the level of power wanted from the motor
set_direction T val: 0/10 Requests the direction for the vehicle to move in
set_lights L val: 0/1 Requests for the lights to be turned on/off