Download the software
Download version 1.0, 5,5 kB tar.gz package.
This software has been developed and tested on an Intel x86 machine, running Debian GNU/Linux and Perl with required modules.
It's written mainly for the Lynxmotion 5-axis robot arm (www.lynxmotion.com), but can be used for any project or application using the Mini SSC-II device.
BE SURE TO READ THIS TEXT, ESPECIALLY "BEFORE STARTING UP", BEFORE YOU START THE SOFTWARE!
Note that this software is still in development. All functions are not implemented or have bad coverage.
Purpose of this software
Controlling the Mini SSC-II. This device is a serial servo controller, that controls up to seven servo motors via a RS-232 compatible serial port. You can hook up several Mini SSC-II together to control more servos.
What you need
* A Mini SSC-II
* A Linux installation
* A serial port (ie. /dev/ttyS0)
* Perl interpreter
* Perl modules: Curses, Curses::Widgets, FileHandle
Before starting up
Open the Perl code in an editor application. In the subrouting "init", you will see the variable "$servos". This variable sets the number of servos you have connected to the Mini SSC-II, with a base of 0. So, if you have six physical servos connected, set this to "5" (0, 1, 2, 3, 4, 5).
Here you can also find the variable "$serial_device", which must be the serial port in use.
For each servo attached, there are the variables "$servo_min", "$servo_max" and "$servo_home".
The first two controls the minimum and maximum value that can be set for the servo. It's important that you set these variables correct, otherwise you can damage your equiment or servos when moving them.
A normal working range is 0-254, but for various reasons you may not have all that range available, for example in the Lynxmotion 5-axis arm.
The last variable sets the servo's home position, and this position will be sent to the Mini SSC-II when starting up and when you use the HOME key for that servo.
You also need to set the serial port to the correct settings for the Mini SSC-II. This can be done using the binary "stty" on the serial port in use.
Using the software interactively
Make sure the Perl code is executable, and write:
The main screen will display (adjusted to your screen width and height). Serial commands will be sent out to position the servos to their home positions.
The screen is divided into three areas: servo positions, messages and program. At startup, the cursor is in the window "servo positions", at servo 0.
Use the arrow up and down keys to adjust the position of the servo. Use the arrow left and right keys to change which servo to command.
To move the selected servo directly to the minimum position, press "Page Down". To move the selected servo directly to the maximum position, press "Page Up". To move the selected servo to its home position, press "Home".
To bring all the connected servos to their home positions, press "H".
+-Servo positions---------------------------------------+ | Max: 254 180 205 230 100 | | S0: 138 S1: 178 S2: 205 S3: 167 S4: 100 | | Min: 30 40 30 30 0 | Illustration: The window shows the maximum, current and minimum position for each servo connected to the Mini SSC-II device.
The current positions of each servo can be saved to a program. Press the "A" key to add all positions to the program (note to-do for editing/deleting).
You can run the program by pressing the "R" key. The servos will adjust for each row in the program. The display will also update, so you can keep track of the servo positions. There is currently no way to stop a running program, except hitting "Ctrl-C" which will quit the whole program.
To save a program, press the "S" key. Enter a filename, the file will be saved relative to your home directory.
To load a saved program, press the "L" key and enter the full path and filename.
To quit and exit back to the shell prompt, press "Q".
Using the software non-interactively
If you just want to run a saved program, and not interact with the software, you can call the Perl executable like this:
./sc.pl --run-program-once program.ssc
./sc.pl --run-program-loop program.ssc
The first variant will read the supplied filename and then position the servos according to the commands in the file. This will be done once.
The second variant will do the same, but keep positioning the servos in a loop. You can break this by pressing "Ctrl-C".
Notes of to-do
* A large program breaks the display. Do handling of scrolling the program.
* Editing and deleting rows in a program.
* Adding comments.
WARNING! IMPROPER USE OF THIS SOFTWARE CAN DAMAGE YOUR SERVO EQUIPMENT AND/OR OTHER EQUIPMENT AND/OR PEOPLE NEAR THE SERVO OPERATING AREAS. TAKE GREAT CAUSION VERIFYING THAT YOUR COMMANDS AND PROGRAMS DO NOT CAUSE ACCIDENTS OR HARM. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHOR OF THIS APPLICATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE APPLICATION OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.