This directory contains the device entries for the Octal Servo Controller. HARDWARE The Octal Servo Controller provides eight servo pulses with each pulse width accurate to 50 nanoseconds. The cycle time for all eight signals is 20 milliseconds. The servos are numbered from 0 to 7 with servo 0 on the lowest number pin on the connector (pin 2). Servo 7 is on the highest numbered pin (pin 16). The servo signals are not inverted and the power-on default values are all high. DEVICE NODES The device interfaces to the Octal Servo Controller include individual controls for each servo as well as a control which manipulates the servos as a group. .../servo0, .../servo1, .../servo2, ... .../servo7 Commands to move the servos are a pair of comma separated integers. Each command ends with a newline character. The first number is the target pulse width in nanoseconds. The second number specifies how long, in milliseconds, it should take to get to that pulse width. A pulse width of 0 sets the output high which leaves the servo undriven. A move duration of 0 milliseconds causes the change to take effect immediately. The default value is 0. Reading the servo device node gives the current servo pulse width in nanoseconds, followed by a comma, a zero, and a newline. The value that you read will not be the value that you write if you give a long transition time. That is, the read may capture the instantaneous value as the pulse width transitions from the old value to the new value. Here are some common examples: # give servo1 a 1.00 millisecond width echo '1000000, 0' > servo1 # transition servo2 to a width of 2 ms and take 100 ms to do it. echo '2000000, 100' >servo2 # get the current pulse width of servo 3 cat servo3 .../servogroup The servogroup device node is a convenient way to move all of the servos in a coordinated move. The command syntax is a comma separated list of integer pulse widths followed by the number of milliseconds that the move should take. A pulse width of zero sets that output high and pulse width of -1 takes that pulse width out of the group move. Some examples may help: # Move the first four pulse widths to center and take 300 ms to do it echo '1500000, 1500000, 1500000, 1500000, -1, -1, -1, -1,300' > servogroup A read of servogroup returns the current positions of all servos as a comma separate list of pulse widths measured in nanoseconds. The read string has a trailing comma, zero, and newline. As a safety feature, a write to an individual servo take precedence over a group move, so that a write of zero to an individual servo will turn off the servo even if it is in the middle of a group move.