How To Communicate With The Lw20 Using A Controller - Lightware SF20 Product Manual

Lidar sensor
Hide thumbs Also See for SF20:
Table of Contents

Advertisement

7. How to communicate with the LW20 using a controller

The LW20 is designed to communicate with a host controller. This controller can be a single board computer, flight controller or a PC.
There are two communications interfaces available, serial and I2C. The LW20 and SF20 models both ship with a single serial and I2C
communication cable.
The serial port is a one-to-one protocol that lets a single LW20 talk to a single host controller. The serial interface uses 3.3 V logic to
transmit results and receive commands.
Multiple LW20's with an I2C port can be connected onto an I2C bus. The I2C interface uses 3.3 V logic to receive commands from a
master device.
The communication language for both the serial and I2C ports is based on ASCII commands and messages. Command strings take the
form of simple mnemonics and results are provided as text strings.
A command string is made up of:
A directive that indicates what action to take
A channel that represents a functional block containing related information
An index that determines which value is being acted on
A numeric value if needed
<CR><LF> indicates the end of the command
There are four different directives, each using a single ASCII character:
?
Fetch a value
#
Write a value
$
Stream live results
%
Save changes
There are six channels available inside the LW20:
P
The Product channel contains product related information
L
The Laser channel contains all laser related information
S
The Servo channel contains all servo related information
C
The Communication channel handles serial and I2C data
A
The Alarm channel provides alarm status information
E
The Energy channel controls power usage
A typical command sent by the host controller would be:
?PN<CR><LF>
Which means:
What is your Product Name?
The LW20 / SF20 would reply with:
PN:LW20 <CR><LF>
Which means:
Product Name : LW20
Full details of the communication language are given in Appendix C.
LW20 / SF20 LiDAR - Product manual - Revision 7
|
|
15
of
28
© LightWare Optoelectronics (Pty) Ltd, 2018
LW20 / SF20 LiDAR sensor
Product manual
|
www.lightware.co.za

Advertisement

Table of Contents
loading

This manual is also suitable for:

Lw20Lw20/bLw20/cSf20/bSf20/c

Table of Contents