Home About Blog

Communication protocols

From Snowcap

Jump to: navigation, search

Communication protocols

Ascii Host to Control Board v1

The commands from the host to Control Board are in the following form: <command char><command specific parameters><newline>. There is one character defining the command class, then class specific parameters and finally a newline. The newline can be any combination of \n and \r, sequential characters are ignored.

Led

  • <l><t,0,1><newline>

The command specific parameter must be one of the following:

t
Toggles the led on and off.
0
Turns the led off.
1
Turns the led on.

PWM

  • <fX><newline>

  • <[0-9]nnnnn,s><newline>

The command specific parameter must be one of the following:

fX
Sets the PWM frequency to X Hz (default 50). Must not be changed, when running.
[0-9]s
Stops the PWM channel 0-9
[0-9]nnnnn
Sets the duty cycle of channel 0-9 to nnnnn. 0 for 0%, 5000 for 50%, 10000 for 100%.

Ascii Control Board v1 to Host

TBD