Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
en:dev:digitail-command-protocol [2023/12/08 22:59] – created darkgrueen:dev:digitail-command-protocol [2024/03/21 10:26] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== TAIL PROTOCOL ====== ====== TAIL PROTOCOL ======
  
-== Firmware Ver 2.21 (05Nov2019) ==+Command list for The Tail Company DIGITAiL Firmware Ver 2.21 (05Nov2019)
 ===== Command List ===== ===== Command List =====
  
Line 83: Line 84:
  
 Both servos move from 22.5° to 157.5° (position 1 to 7) and back, for 3 times; each cycle is (68+68)*20ms = 2.72s long Both servos move from 22.5° to 157.5° (position 1 to 7) and back, for 3 times; each cycle is (68+68)*20ms = 2.72s long
-USERMOVE U1P2N3A1A7B1B7L68L68 + 
-U1 -> Store into user preset 1 +**USERMOVE U1P2N3A1A7B1B7L68L68** 
-P2 -> The move consists of 2 points + 
-N3 Repeat the sequence 3 times +U1 -> Store into user preset 1\\  
-A1A7 Servo1 moves from 1 to 7 (157.5° to 22.5°) +P2 -> The move consists of 2 points\\  
-B1B7 Servo2 moves exactly as servo1 +N3 Repeat the sequence 3 times\\  
-S68S68 Position 2 is reached in 68*20ms = 1.36s; return to position 1 in the same time+A1A7 Servo1 moves from 1 to 7 (157.5° to 22.5°)\\  
 +B1B7 Servo2 moves exactly as servo1\\  
 +S68S68 Position 2 is reached in 68*20ms = 1.36s; return to position 1 in the same time\\ 
  
 === Example 2 – Test Servos === === Example 2 – Test Servos ===
  
 Moves servos in steps of 90° every 2 seconds; servo2 is delayed by 90° Moves servos in steps of 90° every 2 seconds; servo2 is delayed by 90°
-USERMOVE U2P4N3 A0A4A8A4 B4B8B4B0 S100S100S100S100 + 
-U2 Store into user preset 2 +**USERMOVE U2P4N3 A0A4A8A4 B4B8B4B0 S100S100S100S100** 
-P4 The move consists of 4 points + 
-N3 Repeat the sequence 3 times +U2 Store into user preset 2\\  
-A0A4A8A4 Move servo1 90° at a time, starting from 0° +P4 The move consists of 4 points\\  
-B4B8B4B0 Move servo2 90° at a time, starting from 90° +N3 Repeat the sequence 3 times\\  
-S100S100S100S100 Each position is held for 100*20ms = 2s;+A0A4A8A4 Move servo1 90° at a time, starting from 0°\\  
 +B4B8B4B0 Move servo2 90° at a time, starting from 90°\\  
 +S100S100S100S100 Each position is held for 100*20ms = 2s\\ 
  
 ==== USERLEDS Examples ==== ==== USERLEDS Examples ====
Line 107: Line 112:
  
 The led strip lights up for 100ms every 2s The led strip lights up for 100ms every 2s
-USERLEDS U1P2N5A8A0S5S95 + 
-+**USERLEDS U1P2N5A8A0S5S95** 
-+ 
-+U1 Store into user preset 1\\  
-+P2 The pattern consists of 2 brightness points\\  
-+N5 Repeat pattern 5 times\\  
-+A8A0 Start at full brightness, then turn off\\  
-+S5S95 On for 5*20ms = 100ms; Off for 95*20ms = 1.9s (total time = 2 seconds)\\  
-+ 
-+=== Example 2 – Fade in/out (similar to LEDTRI) === 
-+
-20ms +
-40ms +
-60ms +
-80ms +
-100ms +
-120ms +
-A0 L1 +
-A8 L1 +
-A3 S1 +
-A6 L3 +
-A0 S0 +
-This closes the cycle (0 duration) +
-Optional as the last position is copied from the first +
-Figure 1 - Graphical Example +
-U1 Store into user preset 1 +
-P2 The pattern consists of 2 brightness points +
-N5 Repeat pattern 5 times +
-A8A0 Start at full brightness, then turn off +
-S5S95 On for 5*20ms = 100ms; Off for 95*20ms = 1.9s (total time = 2 seconds) +
-Example 2 – Fade in/out (similar to LEDTRI)+
 The led strip lights up slowly, then dims until completely off; this is repeated 3 times The led strip lights up slowly, then dims until completely off; this is repeated 3 times
-USERLEDS U2P2N3 A0A8 L100L100 + 
-U2 Store into user preset 2 +**USERLEDS U2P2N3 A0A8 L100L100** 
-P2 The pattern consists of 2 brightness points + 
-N3 Repeat pattern 3 times +U2 Store into user preset 2\\  
-A0A8 Start off, finish at full brightness +P2 The pattern consists of 2 brightness points\\  
-L100L100 Each brightness point is reached in 100*20ms = 2s +N3 Repeat pattern 3 times\\  
-Random Moves (Auto)+A0A8 Start off, finish at full brightness\\  
 +L100L100 Each brightness point is reached in 100*20ms = 2s\\  
 + 
 +===== Random Moves (Auto) ===== 
 Defines a sequence of random moves, selected from any of 3 groups as below; interval between moves varies randomly from T1 and T2, while Defines a sequence of random moves, selected from any of 3 groups as below; interval between moves varies randomly from T1 and T2, while
-Move Group + 
-List of moves in the group +Move Group List of moves in the group ^ 
-Calm and Relaxed +Calm and Relaxed Slow Wag 1, Slow Wag 2, Slow Wag 3 | 
-Slow Wag 1, Slow Wag 2, Slow Wag 3 +Fast and Excited Fast Wag, Short Wag, Happy Wag, Erect | 
-Fast and Excited +Frustrated and Tense Tremble 1, Tremble 2, Tremble Erect, High Wag | 
-Fast Wag, Short Wag, Happy Wag, Erect + 
-Frustrated and Tense +==== Commands ==== 
-Tremble 1, Tremble 2, Tremble Erect, High Wag? + 
-Commands +**AUTOMODE G<n> G<n>G<n> T<nnn> T<nnn>T<nnn> STOPAUTO** 
-AUTOMODE G<n> G<n>G<n> T<nnn> T<nnn>T<nnn> STOPAUTO+
 The tail will pause for a random number of seconds between each move (min and max specified by the first and second T parameter, respectively). The tail will stop completely after the time passed by the 3rd T parameter. The tail will pause for a random number of seconds between each move (min and max specified by the first and second T parameter, respectively). The tail will stop completely after the time passed by the 3rd T parameter.
 +
 Stopauto will abort the current ‘auto mode’ session after completing any ongoing move. Stopauto will abort the current ‘auto mode’ session after completing any ongoing move.
-Letter prefix + 
-Parameter type +Letter prefix Parameter type Range of values ^ 
-Range of values +Move Group (see table above) 1..3 | 
-G +Time in 1 sec increments 15..240 (15s .. 4min)\\ 1st parameter – min random pause between moves\\ 2nd parameter – max random pause between moves\\ 3rd parameter – total duration 
-Move Group (see table above) + 
-1..3 +The parameter order is not important, except that the 3 T parameters are interpreted in the above order
-T + 
-Time in 1 sec increments +=== Example === 
-15..240 (15s .. 4min) + 
-1st parameter – min random pause between moves +**AUTOMODE T15 T60 T240 G1 G2** 
-2nd parameter – max random pause between moves + 
-3rd parameter – total duration + 
-The parameter order is not important, except that the 3 T parameters are interpreted in the above order Example AUTOMODE T15 T60 T240 G1 G2+== Copyright 2023 © The Mechanical Tail Company Limited contact@thetailcompany.com. All Rights Reserved. ==
  
Back to top