How to program push button to start autonomous
Page 1 of 1

Author:  allmightme [ Thu May 30, 2013 5:53 pm ]
Post subject:  How to program push button to start autonomous

Hello I am trying to program my robot for when I push a button on my transmitter, it will start my autonomous mode, and at the end of the autonomous it will switch over to driver control, can anyone help me with this, I am using using cortex and RobotC.

Author:  JohnWatson [ Mon Jun 03, 2013 9:54 am ]
Post subject:  Re: How to program push button to start autonomous

I have one question; do you want to use this with the actual VEX competition template, or more for internal testing? Using it with the VEX competition templates won't work, as the Field Control System blocks communication between the VEXNet Joystick Controller and the Cortex during the autonomous period; however, you can make a custom template that runs one section of code for a specific amount of time then switches to another section of code.

In this particular case, there are a couple of programming tools that you will need to learn about first, specifically while loops, button commands, and timers. Fortunately, we cover all of these subject in our VEX Cortex Video Trainer; specifically, you will need to take a look through the 'Movement -> Shaft Encoders -> Forward for Distance' section (While loops), the 'Remote Control -> Buttons' section (Button commands), and the 'Remote Control -> Timers' section (Timers).

This should help get you started on the right path to making the code you need. Take a look through the videos and the supplementary material, start to formulate a program, then show us what you come up with and we will be more than happy to help you further with this. Thanks in advance, and I can't wait to see what you come up with!

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group