Protocol
Serial setting
:
Port rate: 9600; Parity: none; Stop bit: 1
Command: Control command consists of four bits, data0+data1+sum. Sum=Low 8 bit of
the sum of data0+data1.
Command Format
Function
Description
0x11
+
NC
+
NC
+
Sum
(Sample: 0x11 0x00 0x00
0x11)
Enable 16 bit
temperature
reading
Reading the temperature, the return data format will be:
0x11+High(tempeLow(tempeSUM
If the temperature is above 0, the first four bits of High will be all 0. If the temperature
is below 0, the first four bits of High will be all 1.
The last 4 bits of High together with the Low bits stands for 12bits temperature. The
resolution is 0.1. When the reading is invalid, it returns 0x11+0xFF+0xFF+SUM
0x22
+
Degree
+
NC
+
SUM (Sample: 0x22 0x00
0x00 0x22 )
Enable 16 bit
distance reading
The degree in the command is used to control a servo motor to rotate corresponding
degree.
Degree: 0-46 stands for 0-270 degrees, for example, 3 stands for 18 degrees.
Return data format will be: 0x22
+
High(distance)
+
Low(diSUM. When the
reading is invalid, it returns 0x22+0xFF+0xFF+SUM