View unanswered posts | View active topics It is currently Fri Nov 28, 2014 4:38 am






Reply to topic  [ 2 posts ] 
programming servo 
Author Message
Rookie

Joined: Wed Sep 19, 2012 8:31 pm
Posts: 1
Post 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.


Thu Sep 27, 2012 10:21 am
Profile
Site Admin
Site Admin

Joined: Tue May 15, 2007 9:02 am
Posts: 406
Post 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.

_________________
Jesse Flot
CMU Robotics Academy
ROBOTC Support


Mon Oct 01, 2012 3:07 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.