will move with servo. I would like to ask a question, now is the better for library for the arduino. forward to regulate the speed of the fish. There are 2 that you can use. I just want your opinion
Good question VarSpeedServo has more documentation than what I put on ServoEx.
If people are interested I should put a readme file up there. I did servoEx awhile ago as I wanted some of the same capabilities of the SSC-32 when I started adapting programs from Basic Atom Pros using an SSC-32 or the HServo code over to an Arduino. I was a simple adaptation of the Servo library. Can go into more details if interested. Also I should probably take a pass through and see if anything has been added/fixed in the Servo library that should be folded into this.
yes interested, from what I understand is your library, can move in groups and the servo to make a move with identical times.
I have written a code that can and move GROUP servos with speed. i use the varspeedservo. the commands sent from the serial port
example
#0P2400S10,#16P600S100,#3P1600S50… An move ch 0 to 2400us with speed 10 (slow), and ch 16 to 600 speed 100 (fast), and ch3 to 1600 with 50 speed (normal speed)
i have and Q commad that tells me if any servo moves and send me “+” when it moves and "."when they stop their movement
channel
P position
S speed
PO offeset -100 +100
Q quert movent servos
L and H channel to Low (0V)or High (5V)
this is my commands
Now I want to add and move the servo with time, use in your library, it varspeedservo does not support
Sorry for my bad english but translate with google
I may extract ServoEx from the Arduino Phoenix In parts project and create a new project up on github. Not sure how many others will care, but I just updated the library up there, where I merged in changes, to make it compatible with the Teensy 3/3.1. I now have the simple sweep example working on both Botboarduino as well as on one of my break out boards. May have to try it out on the Biped brat.
Note: the VarSpeed library does more or less the same thing as I do…
That is both of our routines update the Interrupt handler and add (or subtract) a delta pulse until we get the new desired position (pulse width).
Mine does it more like the T command for the SSC-32, where I do the calculations as part of the library, where as the VarSpeed library you do the calculations in much the way we do it when we are using the HServo commands on the Basic Atom Pros.
If you wish to continue to use VarSpeed, you can get the equivalent capabilities, by doing a few calculations:
Suppose you wish to move a servo from it’s current position of 1500us to a new position of 2400us in a half second(500ms).
So you have a delta of 900us (2400-1500).
The servos update every 20ms so 500ms is 25 cycles (500/20)
So a speed value of 900/25 or 36 should move you to the desired location in the specified time.
Note with their API there is no way to do them as a group, but personally probably does not matter. You simply call their API in a loop or the like for each of the servos and I would guess you would never notice that potentially some servos get there one or so servo cycles before the others…
I’m interested! This may be something I can incorporate into my own robot code, and I could probably use it now.
I like your approach much better! I’ve used the Basic Atom Pros, so I know what you are talking about.
This would be very useful on my robots. The SES Rover has a 3DOF gripper, and a pan/tilt. I could use this when moving both of them. I have also incorporated the T and S commands of the SSC-32 into my servo move routines. I can move servos by pulse width, or by degrees, and group moves are supported. I will, at some point, roll my servo code into a library also.