Skip to main content Link Menu Expand (external link) Document Search Copy Copied
Table of contents
  1. Communication frame
    1. Start bit
    2. Command
    3. Parameters
    4. Parity bit
    5. Stop bit
  2. Examples

Communication frame

Data is transmitted via sound, from the sender (computer or smartphone) to the receiver (robot). This data is contained in a custom 13bit frame.

frame

Start bit

A correct frame always starts with a 0 as the first bit.

Command

The next two bits describe the command sent to the robot:

  • 00 - Forward
  • 01 - Backward
  • 10 - Turn right
  • 11 - Turn left

Parameters

The next eight bits desribe the parameters for the command sent, as an 8bit unsinged integer. If the command is Forward or Backward, the parameters are the distance the robot must travel, in centimeters. If the command is Turn right or Turn left, the parameters are the angle the robot must turnn in degrees. They always are an 8bit unsigned integer.

Parity bit

The next bit describes the parity of the previous bits sent:

  • 0 - even parity
  • 1 - odd parity

This allows for error checking of the received frame.

Stop bit

A correct frame always ends with a 1 as the last (13th) bit.

Examples

Here are some examples of frames:

  • 0000100101101 - Start bit correct, Forward command, 75cm to travel, even parity, stop bit correct.
    Here are the different parts of the frame: 0_00_01001011_0_1
  • 0100010110001 - Start bit correct, Turn Right command, 44° to turn, even parity, stop bit correct.
    Here are the different parts of the frame: 0_10_00101100_0_1

And here is an audio file of an example frame (Turn Left 90°):


Back to top

Copyright © 2023 Martin Fonteyn, Lucas Placentino and Sylvain Powis de Tenbossche - EPB ULB