[chbot] servo driving
Hanno Sander
hanno at mydancebot.com
Tue Aug 18 06:19:10 BST 2009
Here's the object for the Parallax Propeller that drives 32 servos
with one of the Propeller's cogs:
http://obex.parallax.com/objects/51/
Besides "set and forget" it also supports "ramping", so you can tell
it to move from position x to position y over the next minute- while
doing other stuff in the Propeller's other cogs.
Hanno
On Tue, Aug 18, 2009 at 2:16 PM, Charles Manning<manningc2 at actrix.gen.nz> wrote:
> Hi All
>
> I can't make the robotics meeting tonight. A pity since I was hoping to
> discuss RC servo driving etc in the legged walker discussion.
>
> I've been dabbling with RC driving with an AVR and have developed some code
> which can drive up to 16 RC servos simultaneously (though at this stage only
> 8 channels are in the checked in code).
>
> Code at http://github.com/cdhmanning/avrprojects/
>
>
> The code allows you to "set and forget" and all the servo stuff is then driven
> in the background by an interrupt.
>
>
>
> The main functions to call are
>
> servo_Initialise(); Initialise the whole party
>
> servo_Set(portPin,time)
> portPin is the pin number on PORTB. ie. 1 means controlling a servo on PORTB1.
> time is the pulse width in 10s of microseconds. 100 means full anti-clockwise,
> 200 means full clockwise.
>
> There is no delay in the functions themselves, so you can do things like:
>
> //Set servos 0,1,2 to all anti-clockwise.
> servo_Set(0,100);
> servo_Set(1,100);
> servo_Set(2,100);
>
> // do other stuff
>
> // Set servo 0 to anti-clockwise,servo 1 to middle, servo 2 to clockwise
> servo_Set(0,100);
> servo_Set(1,150);
> servo_Set(2,200);
>
> This should enable pretty simple gait control.
>
> Have fun
>
> Charles
>
>
> _______________________________________________
> Chchrobotics mailing list Chchrobotics at lists.linuxnut.co.nz
> http://lists.ourshack.com/mailman/listinfo/chchrobotics
> web site: http://kiwibots.org
> Meetings Dates:
> Tue 18 August 2009 6.30pm
> Tue 20 October 2009 6.30pm
> Tue 15 December2009 6.30pm
> When replying, please edit your Subject line to reflect new content.
>
More information about the Chchrobotics
mailing list