Skip to content

Serial Relay Board Communication Spec

Lance Hudson edited this page Jan 28, 2015 · 1 revision

Serial Relay Board Communication Spec

Each Symbol is an ASCII Code

Symbol ASCII Code
SOH 01
SUB 1A
ENQ 05
RS 1E
EOT 04

Definitions to board

Change State of Relay

This command changes the state of a relay to on or off.

Below is what should be sent over serial. The pipes (|) are only there to make it easier to read.

| SOH | SUB | Relay ID | RS | State | EOT |

Relay ID should be replaced with the ID of the relay you wish to change (Starting at 1).

State should be replaced by 1 for ON and 0 for OFF.

Example

|SOH|SUB|1|RS|0|EOT|

or the hex version

011A011E04

Request State

The command requests the state of a relay.

| SOH | ENQ | Relay ID | EOT |

Relay ID should be replaced with the ID of the relay you wish to change (Starting at 1).

Example

01050104

Definitions from board

Relay State

This indicates the state of a particular relay, it is sent in response to one of the above commands.

| SOH | Relay ID | RS | State | EOT |

Example

01011E0104