Download this file
Master-slave communication protocol
***********************************
byte buffer[]: received data
Buffer structure
================
buffer[0]: command
buffer[1]: length of data
buffer[2..length+2] data
Protocol Commands
=================
Requests
--------
00: status request
length = 0
no data
01: relay close request
length = 0
no data
02: relay open request
length = 0
no data
Replies
-------
80: status reply
length = 4
data[0]#7: relay status (1: closed, 0: open)
data[0]#6: reserved
data[0]#5: reserved
data[0]#4: reserved
data[0]#3: reserved
data[0]#2: reserved
data[0]#1: reserved
data[0]#0: sign of temperature
data[1]: temperature (in 1/2 degrees)
data[2]: current, MSB
data[3]: current, LSB (in mA)
FF: error reply
length = 1
data[0]: faulty command number