View unanswered posts | View active topics It is currently Sat Jul 26, 2014 3:16 pm






Reply to topic  [ 3 posts ] 
programming a motor and a servo 
Author Message
Rookie

Joined: Thu Oct 27, 2011 4:53 pm
Posts: 5
Post programming a motor and a servo
The compiler keeps picking up an error every time i try to program a motor and a servo to our arm. I have the motor programmed but its still not working (as said on my previous post). but i dont know how to program the servo part of the arm so i was hoping if someone could help me with it please!!
PROGRAM:

task main{
while(true){

motor[port2] = vexRT[Ch2]*3;
motor[port3] = vexRT[Ch3]*-3;

if(vexRT[Btn5U]==1)
{
motor[port4] = 60;
}
else if (vexRT[btn6U] ==1)
{
motor[port4] = -60;
}
else
{
motor[port4] = 0;
}
}
}
If you decide to just make the program for me or change what ever needs to be changed then please do so! you can pick any motor port


Mon Oct 31, 2011 9:17 am
Profile
Site Admin
Site Admin

Joined: Wed Feb 21, 2007 6:09 pm
Posts: 31
Post Re: programming a motor and a servo
Please ask this question in the VEX forums. Thanks

I just ran your code and didn't get an error message. When you post your question please describe the error message. Thanks

task main{
while(true){

motor[port2] = vexRT[Ch2]*3;
motor[port3] = vexRT[Ch3]*-3;

if(vexRT[Btn5U]==1)
{
motor[port4] = 60;
}
else if (vexRT[btn6U] ==1)
{
motor[port4] = -60;
}
else
{
motor[port4] = 0;
}
}
}


Tue Nov 01, 2011 9:05 am
Profile
Rookie

Joined: Thu Oct 27, 2011 4:53 pm
Posts: 5
Post Re: programming a motor and a servo
no thats not what i meant. every time i try adding a motor there a compiler error.


Tue Nov 01, 2011 9:16 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 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.