View unanswered posts | View active topics It is currently Sat Dec 20, 2014 6:13 am






Reply to topic  [ 2 posts ] 
does this mean go forward for only 100 degrees rotation? 
Author Message
Rookie

Joined: Mon Feb 10, 2014 11:14 am
Posts: 2
Post does this mean go forward for only 100 degrees rotation?
does this mean go forward for only 100 degrees rotation?

task main()
{
nMotorEncoder[motorB] = 0;
nMotorEncoder[motorC] = 0;

nMotorEncoderTarget[motorB] = 100;
nMotorEncoderTarget[motorC] = 100;

motor[motorB] = 50;
motor[motorC] = 50;
wait1Msec(8000);
}


Sun Feb 23, 2014 5:11 pm
Profile
Professor
User avatar

Joined: Sat Aug 31, 2013 9:15 am
Posts: 213
Post Re: does this mean go forward for only 100 degrees rotation?
Yes, but if you're planning on using this as part of a larger program, I would recommend removing the wait1Msec() command and replacing it with the following:
Code:
while (nMotorRunState[motorB] != runStateIdle && nMotorRunState[motorC] != runStateIdle){}


This will make the program wait until the motors have stopped moving before continuing the program.

_________________
FTC Team 6100 Chariots of Fire - Programmer (2012-2013)
FTC Team 7468 Blue Chariots of Fire - Programmer (2013-2014)
FTC Team 7468 Blue Chariots of Fire - Mentor (2014-2015)
Check out our team website at http://bluechariotsoffire.com/.


Sun Feb 23, 2014 5:17 pm
Profile
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.