View unanswered posts | View active topics It is currently Mon Jul 06, 2020 2:52 am

Reply to topic  [ 3 posts ] 
vex competition question 
Author Message

Joined: Sat Mar 03, 2012 3:55 pm
Posts: 1
Post vex competition question
Is there a way I con configure my competition code to run Autonomous then driver controled like it would in a real competition so our group can practice?

Sat Mar 03, 2012 4:27 pm
Site Admin
Site Admin

Joined: Tue May 15, 2007 9:02 am
Posts: 409
Post Re: vex competition question
If you keep your robot connected to the computer over VEXnet, you can use the "Competition Control" debug window. Go to Robot > Debug Windows > Competition Control.

Jesse Flot
CMU Robotics Academy
ROBOTC Support

Thu Mar 15, 2012 3:18 pm

Joined: Fri Jan 27, 2012 6:57 pm
Posts: 40
Post Re: vex competition question
We have code in our program that let's us press a button on the LCD screen to start Autonomous. You could do something similar (have two buttons on the joystick which when pressed start Autonomous):
if (vexRT[Btn5U] && vexRT[Btn5D])

Then if you want to be able to regain control after Autonomous is finished, add this at the end of you Autonomous code: (It'll start operator code when you hit a joystick; this has the benefit of not moving you into operator code prematurely during a competition, because the joysticks are disabled then)

   if (abs(vexRT[Ch1]) > JOYSTICKDEADZONE || abs(vexRT[Ch2]) > JOYSTICKDEADZONE || abs(vexRT[Ch3]) > JOYSTICKDEADZONE || abs(vexRT[Ch4]) > JOYSTICKDEADZONE)

Sat Mar 24, 2012 2:09 pm
Display posts from previous:  Sort by  
Reply to topic   [ 3 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.