Wiki source code of LSS-P - Communication Protocol

Version 11.1 by Coleman Benson on 2023/06/26 15:03

Hide last authors
Eric Nantel 6.1 1 {{warningBox warningText="More information coming soon"/}}
2
Coleman Benson 9.1 3
Coleman Benson 10.1 4
5
Eric Nantel 1.2 6 (% class="wikigeneratedid" id="HTableofContents" %)
7 **Page Contents**
8
9 {{toc depth="3"/}}
10
11 = Serial Protocol =
12
13 The Lynxmotion Smart Servo (LSS) serial protocol was created in order to be as simple and straightforward as possible from a user perspective ("human readable format"), while at the same time staying compact and robust yet highly versatile. The protocol was based on Lynxmotion's SSC-32 & SSC-32U RC servo controllers and almost everything one might expect to be able to configure for a smart servomotor is available.
14
15 In order to be able to control each servo individually with commands, the first step should be to assign a different ID number to each servo (see details on the Configure ID, or "CID" command [[here>>doc:||anchor="HIdentificationNumber28ID29"]]). Only the servo(s) which have been configured to a specific ID will act on a command sent to that ID. There is currently no CRC or checksum implemented as part of the protocol.
Coleman Benson 9.1 16
17 = Action Commands =
18
Coleman Benson 11.1 19 Action commands tell the servo, within that session, to do something (i.e. "take an action"). The types of action commands which can be sent are described below, and they cannot be combined with other commands such as queries or configurations. Only one action command can be sent at a time. Action commands are session-specific, therefore once a servo is power cycled, it will not have any "memory" of previous actions or [[virtual positions>>||anchor="HVirtualAngularPosition"]] (described below). Action commands are sent serially to the servo's Rx pin and must be sent in the following format:
Coleman Benson 9.1 20
Coleman Benson 11.1 21 1. Start with a number sign **#** (Unicode Character: U+0023)
22 1. Servo ID number as an integer (assigning an ID described below)
23 1. Action command (one or more letters, no whitespace, capital or lowercase from the list below)
24 1. Action value in the correct units with no decimal
25 1. End with a carriage return **\r** or **<cr>** Unicode Character (U+000D)
Coleman Benson 9.1 26
Coleman Benson 11.1 27 (((
28 Ex: #5D18000<cr>
Coleman Benson 9.1 29
30 This sends a serial command to all servo's RX pins which are connected to the bus and only servo(s) with ID #5 will move to a position (1800 in tenths of degrees) of 180.0 degrees. Any servo on the bus which does not have ID 5 will take no action when receiving this command.
Coleman Benson 10.1 31
32 == Modifiers ==
33
34 {{html clean="false" wiki="true"}}
35 <div class="cmdcnt"><div class="cmdpad"></div><div class="cmdtxt">
36 Modifiers can only be used with certain **action commands**. The format to include a modifier is:<div class="wikimodel-emptyline"></div>
37
38 1. Start with a number sign **#** (Unicode Character: U+0023)
39 1. Servo ID number as an integer
40 1. Action command (one to three letters, no spaces, capital or lowercase from a subset of action commands below)
41 1. Action value in the correct units with no decimal
42 1. Modifier command (one or two letters from the list of modifiers below)
43 1. Modifier value in the correct units with no decimal
44 1. End with a carriage return **&#92;r** or **&lt;cr&gt;** Unicode Character (U+000D)
45
46 Ex: #5D1800T1500&lt;cr&gt;<div class="wikimodel-emptyline"></div>
47
48 This results in the servo with ID #5 rotating to a position (1800 in tenths of degrees) of 180.0 degrees in a time ("T") of 1500 milliseconds (1.5 seconds).<div class="wikimodel-emptyline"></div>
49 <div class="wikimodel-emptyline"></div></div></div>
50 {{/html}}
Coleman Benson 11.1 51 )))
Copyright RobotShop 2018