View unanswered posts | View active topics It is currently Sat May 26, 2018 3:59 pm

Reply to topic  [ 2 posts ] 
Progressive servo movement 
Author Message

Joined: Thu Oct 20, 2011 5:51 pm
Posts: 4
Post Progressive servo movement
Hey guys,

I know how to program a servo so it moves to a position while you're holding a button, but what I want to know is if it's possible to make a servo move a certain number of degrees each time you tap a button? Like if I were to push Joy2Btn(2) once, how would I get the servo to move 90 degrees and then stop until I pressed it again?

Thanks in advance for the help!

Fri Nov 04, 2011 10:55 pm
User avatar

Joined: Tue Sep 14, 2010 9:19 pm
Posts: 496
Post Re: Progressive servo movement
Well, here's a pseudo code example to get you started:
  if button is pressed, servo = servovalue + numdegrees
  while(button is pressed){}

sudo rm -rf /

Sat Nov 05, 2011 12:48 am
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests

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.