5.3
Commands
The user can send commands to activate or deactivate the USB output of the sensor. The
frame of the command is built concatenating 8 bit address of the TeraRanger Evo Thermal,
4 bit Command (CMD) code, 4 bit for data count (indicating how many bytes of data will
follow), N bytes of the data itself and a CRC-8 (8 bit) checksum of the entire frame in the last
byte. The frame layout is depicted in Figure 16.
Figure 16. Frame structure for Evo Thermal commands
The table below lists all commands, including address and CRC-8, that can be sent to the
sensor:
Command Name
Command Description
Command
Deactivate VCP
Output
Deactivate USB VCP Output
0x00 52 02 00 D8
Activate VCP Output
Activate USB VCP Output
0x00 52 02 01 DF
NB:
Each command MUST be transmitted in a continuous stream ie. not byte by byte.
The TeraRanger Evo Thermal will reply to the above commands with a four byte response.
The third byte of the response will contain either an ACK (0x00) or a NACK (0xFF) to
indicate if the sensor has acknowledged or not acknowledged the command. In the case of
the UART interface, the sensor will tolerate moderate buffer overruns but it is advisable to
always wait for a command reply before sending a new command.
5.4
UART / USB output format
By default, TeraRanger Evo Thermal by outputs
calibrated temperature data in deci
Kelvins
. When connected via UART, the sensor will immediately start outputting data on
startup.
However when connected via USB, it is necessary to send the ACTIVATE USB
OUTPUT command as shown in commands table (section 5.3).
Copyright
©
Terabee 2018
Terabee, 90 Rue Henri Fabre
01630, St Genis-Pouilly, France (next to CERN)
15/20