Frame Rate: 16ms
Servos: 1 to 32
Serial, 19200,n,8,1
Protocol: @Daisy (allows for many devices daisy chained)
@ - Start of command, At what device is this command for?
ie: @SSX32 $
- end of command
$ holds the address number. 1 to 255
this number will be decrimented by the device and resent downline
when reaches 0, then the command will no longer be resent.
when a device sees a 1, then this is the current device.
@SSX32 commands
------------------------------
# Servo number, #21 - servo 21 {modal}
P Pulse Width, 500 to 2500
I increment pw -xxx or +xxx
+ Max PW
- Min PW
S uSec step per frame (do not use with T, T over writes S)
Note: servos are updated 62.5 times a second (16ms frames)
T Time in miliSeconds to complete movement of all servos on the line
This parameter must come first on the line {modal}
C Copy a servo, allows a servo to copy another servo
M Mirror a servo, inverted. ie: 1200 (1500-300) mirrors to 1800 (1500+300)
F Follow a servo, allows a servo to follow another servo
O Offset value -500 to 500 (this is written to internal eeprom)
H Home position 500 to 2500 (write a home positon to internal eeprom)
Servos go here on power up. if set to 0, then servos are in off mode
R Return home. Used to send a servo home.
Extended commands
------------------------------
!OFF All servo movements stop. not pause, stop, pw's are off
!ON servos back on.
!HOME All servos go home
!SIN Use sin() mode for the pw, ie: #1 !SIN P1, will use sin mode instead of actual pw
Note, valid on this line only (affects Pxxx after the !SIN command)
This commands range from P0 to P359, this will allow a servo to swing back and forth
in a more natural way, or similar to a pseudo deceleration at endpoints
P0 will be midpoint of min/max
P90 will be max
P180 will be back to midpoint
P270 will be min
P359 will be almost midpoint (P0 [360] will be back to midpoint)
Examples:
------------------------------
Move servo 7 to 1800 pw at a rate of 100uSec step rate per second
@SSX32 #7 P1800 S100
Sets an offset for #8 to 120uSec and #9 to -100uSec
@SSX32 #8 O120 #9 O-100
Send servo 3 home
@SSX32 #3 R
Set home position, move servos home, then to position 1500, back home again
@SSX32 #1 H500 #2 H500 #3 H500
@SSX32 #1 R
@SSX32 T1000 #1 P1500 #2 P1500 #3 P1500
Servo 2 follows servo 1, but at a slower rate, and 3 follows 2
@SSX32 #1 P1500 S100 #2 F1 S80 #3 F2 S70