ROBOTC.net forums
http://www.robotc.net/forums/

programming servo
http://www.robotc.net/forums/viewtopic.php?f=53&t=4912
Page 1 of 1

Author:  kellis62 [ Thu Sep 27, 2012 10:21 am ]
Post subject:  programming servo

How do we program a servo with increments? We have a solution for moving to full capacity, but we need a servo to move at increments.

Author:  jbflot [ Mon Oct 01, 2012 3:07 pm ]
Post subject:  Re: programming servo

One clever way to do this is using a for loop:

Code:
for(int i = 0; i <= 127; i++)
{
   wait1Msec(100);
   motor[servo] = i;
}


You can change the amount of time in the wait1Msec() command to change the rate.

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/