|
|
|||||||
| Register | Links | Tutorials | Data Center | Blogs | Gallery | FAQ | Members List | Social Groups | Calendar | Search | Today's Posts | Mark Forums Read |
| Home | Submit Tutorial | What's New | What's Popular | Search |
| 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) | ||||||
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™ CCTV Camera Systems and Security Camera Accessories by eMS. Ignore the CCTV Camera linkage. Just taking advantage of an inbound link opportunity... |
|||||||
| Tags: | None | ||||||
| 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
|
||||
|
||||
|
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
|
||||
|
||||
|
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™ CCTV Camera Systems and Security Camera Accessories by eMS. Ignore the CCTV Camera linkage. Just taking advantage of an inbound link opportunity... |
|
#4
|
||||
|
||||
|
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
|
||||
|
||||
|
Re: Serial Programming in C# - Center a Servo with an SSC-32
Heck, I'll chip in 2 bucks for that tutorial.
|
|
#6
|
||||
|
||||
|
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™ CCTV Camera Systems and Security Camera Accessories by eMS. Ignore the CCTV Camera linkage. Just taking advantage of an inbound link opportunity... |
|
#7
|
||||
|
||||
|
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
__________________
[URL]http://groups.yahoo.com/group/johnny_five_robots[/URL] |
|
#8
|
||||
|
||||
|
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™ CCTV Camera Systems and Security Camera Accessories by eMS. Ignore the CCTV Camera linkage. Just taking advantage of an inbound link opportunity... |
|
#9
|
||||
|
||||
|
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
__________________
[URL]http://groups.yahoo.com/group/johnny_five_robots[/URL] |
|
#10
|
|||
|
|||
|
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?
|