View unanswered posts | View active topics It is currently Fri Aug 22, 2014 1:46 pm






Reply to topic  [ 3 posts ] 
Baffled! Idle loop NOT working! 
Author Message
Rookie

Joined: Fri Feb 06, 2009 11:43 am
Posts: 11
Post Baffled! Idle loop NOT working!
Just baffled. My robotics class has switched to the cortex system and we are of course learning the "new" programming specifics for using the new joystick. Here is my dilemma. I downloaded this program on to my robot and it appeared to work fine. Now, it starts up completely ignoring the idle loop. The motor on port 4 runs as soon as the vexNet makes the connection.

task main()
{
while(vexRT[btn6U]==0){}
ClearTimer(T1);
while (time10[T1] < 12000)
{
motor[port2] = -vexRT(Ch3);
motor[port3] = vexRT(Ch2);
motor[port4] = 127;

}
motor[port2] = 0;
motor[port3] = 0;
motor[port4] = 0;
}


What could I be doing wrong?

Ken


Wed May 11, 2011 12:38 pm
Profile
Site Admin
Site Admin

Joined: Mon Jun 08, 2009 4:50 pm
Posts: 70
Post Re: Baffled! Idle loop NOT working!
Hi Ken,

Just capitalize the 'B' in "btn6U" in your idle loop.

Cheers,

_________________
Bence Feher

Undergraduate Intern - NREC, Robotics Academy
ROBOTC - Testing/Documentation/Developer

Computer Science, Japanese, East Asian Studies
University of Pittsburgh, Konan University 甲南大学


Thu May 12, 2011 9:52 am
Profile
Rookie

Joined: Fri Feb 06, 2009 11:43 am
Posts: 11
Post Re: Baffled! Idle loop NOT working!
Actually, here is what happened. I must have had the software on Vex 0.5 instead of 2.0 Cortex. Because when I capitalized the "B" I received compile errors. Once I made sure I was on all the correct settings it worked. Still, why would btn6U work for vex 0.5 microchip?


Thu May 12, 2011 2:18 pm
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.