Tutorial: Serial Programming in C# - Center a Servo with an SSC-32

  1. Adrenalynn's Avatar
    Adrenalynn Adrenalynn is offline Banned from posting too much :-)
    Category
    Introduction
    Views
    3,053,402
    Replies
    11
     

    Serial Programming in C# - Center a Servo with an SSC-32

    Difficulty
    Beginner
    Estimated Time
    10 minutes
    Skills Required
    Opening Microsoft C#. ;-)
    Parts Required
    SSC-32 properly powered and configured
    Servo
    Serial cable already tested with SSC-32
    Tools Required
    Microsoft C# (Express is fine)
    Tutorial Navigation
    SSC-32 Servo Controller : Center a Servo with C#

    The Intro:
    At various times I've read here on the forums how difficult it appears to be to get "raw-ish" serial communications going in C#. I've oft debated that sentiment, so here's my contribution to finally putting what I believe to be a misnomer to bed.

    This console application simply centers a servo plugged into an SSC-32. You may need to change the port number and baud rate to match your configuration. Mine's on COM1 set at 38,400bps. Stock is 115,200bps, I believe... This code has been commented to DEATH. Should be pretty readable!

    Although this app only centers the servo on Channel 0, one will quickly see how trivial it would be to center all the servo channels, making this a pretty handy little app all on its own. If you're assembling something and want to quickly center your servos for the build, this is probably the fastest possible method. Can you believe people actually sell dedicated hardware to perform this task?

    (Page 1 of 4)
    I Void Warranties�


Page 1 of 2 12 LastLast
Replies to Tutorial: Serial Programming in C# - Center a Servo with an SSC-32
  1. Re: Serial Programming in C# - Center a Servo with an SSC-32

    very cool.
    thanks
        

  2. Join Date
    Feb 2008
    Location
    Jacksonville, Florida
    Posts
    78

    Re: Serial Programming in C# - Center a Servo with an SSC-32

    OMG I think I actually understood it. That rocks. Now do one for the 84 channel servo controller. Do it. Do it. Do it.
        

  3. Join Date
    Apr 2008
    Location
    Sacramento, CA, USA Area
    Posts
    5,341

    Re: Serial Programming in C# - Center a Servo with an SSC-32

    Someone would need to be donating an 84 channel servo controller. I could probably write to spec, but it'd be kinda silly since I couldn't test it...
    I Void Warranties�
        

  4. Join Date
    Feb 2008
    Location
    Jacksonville, Florida
    Posts
    78

    Re: Serial Programming in C# - Center a Servo with an SSC-32

    Surely Trossen could *lend* you one. It would help sell them if people knew what to do with them.

    I'm just sayin'.
        

  5. Join Date
    Feb 2008
    Location
    Elgin, Illinois
    Posts
    91

    Re: Serial Programming in C# - Center a Servo with an SSC-32

    Heck, I'll chip in 2 bucks for that tutorial.
        

  6. Join Date
    Apr 2008
    Location
    Sacramento, CA, USA Area
    Posts
    5,341

    Re: Serial Programming in C# - Center a Servo with an SSC-32

    Thanks for the kind words!

    Does anyone here have one yet? I'd be willing to write the code to spec and send it to you for testing.
    I Void Warranties�
        

  7. robot maker Guest

    Re: Serial Programming in C# - Center a Servo with an SSC-32

    first time i saw this look maybe better then axon board,since i need total of maybe 20 to 24 servos for my hand project and need at least the same for A-D INPUTS,
    and will need 2 AXON BOARDS verses 1 board of 84 servo control with 32 inputs of A-D
    WHAT IS YOUR OPINION on this Adrenalynn

    Quote Originally Posted by Adrenalynn View Post
    Someone would need to be donating an 84 channel servo controller. I could probably write to spec, but it'd be kinda silly since I couldn't test it...

  8. Join Date
    Apr 2008
    Location
    Sacramento, CA, USA Area
    Posts
    5,341

    Re: Serial Programming in C# - Center a Servo with an SSC-32

    It's not a General purpose MCU. It's an I/O board. The Axon is a general purpose MCU with I/O. Depends on the requirements - do you need a general purpose MCU or a dedicated I/O board? If the latter - what are you going to interface it to to receive data? A general purpose MCU? In that case - the Axon also wins.

    Of course, you can also interface the Axon to one of these.
    I Void Warranties�
        

  9. robot maker Guest

    Re: Serial Programming in C# - Center a Servo with an SSC-32

    didnt seem like it has a mcu,so i guess i have 2 solutions ,one is get 1 axon and use 10 A-D and 16 servo controls and I2C BUS for temperature sensors or 2 AXON boards one for each hand 5 fsr to a-d and 5 themistors

  10. umterps Guest

    Re: Serial Programming in C# - Center a Servo with an SSC-32

    Is it possible to modify this code to make the servos perform a series of commands? I tried it with a delay in between commands, which works well for when there's a time specification in the command, but if I'm just using position commands or velocity is there a way to make it perform a series without using delay?

Closed Tutorial
Page 1 of 2 12 LastLast