Pre Autonomous Task
Page 1 of 1

Author:  bskiesel [ Tue Nov 23, 2010 12:46 pm ]
Post subject:  Pre Autonomous Task

Can the software accept input from the joystick (i.e. button presses) during the pre-autonomous task (task pre_auto) for the purpose of setting configuration variables?

Author:  jbflot [ Tue Nov 23, 2010 2:47 pm ]
Post subject:  Re: Pre Autonomous Task

The Field Control Hardware disables communication from the Remote Control for everything except the user control period, so no, this is not possible.

To accomplish your goal, I have seen teams use the VEX Jumpers in DIGITAL ports. You can configure the ports in the Motors and Sensors Setup as Digital Inputs. When inserted into the port, the Sensor value is 1. When not inserted, the sensor value is 0.

Here's some sample code:

#pragma config(Sensor, dgtl1,  jumper1,             sensorDigitalIn)
#pragma config(Sensor, dgtl2,  jumper2,             sensorDigitalIn)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

task main()
  if(SensorValue[jumper1] == 1)
    //Run some code
    //Run other code

Author:  magicode [ Tue Nov 23, 2010 9:05 pm ]
Post subject:  Re: Pre Autonomous Task

I have found jumpers to be a hassle. They take up ports, reqiure you to rearrange them, and can be troublesome if your brick is in a hard to reach place. I personally like to use a potentiometer. It only takes up one port, can be put in an easy to acess location, and can have the name of the modes printed right onto it. Here is some sample code.
task main(){
  if(SensorVlaue(autonSelector) < 30){
    //Do something
  else if(SensorValue(autonSelector) > 40 && < 70){
    //Do something else
  else if(SensorValue(autonSelector) > 70 && < 100){
    //Do something else

Author:  charsleysa [ Mon Jan 10, 2011 11:55 pm ]
Post subject:  Re: Pre Autonomous Task

You guys are foolish! Why use primitive techniques when you could use a more user friendly design. Use the LCD screen!

Author:  mightor [ Tue Jan 11, 2011 1:51 am ]
Post subject:  Re: Pre Autonomous Task

You are assuming that everyone has an LCD screen. That's a lot more foolish than any of the suggestions that were made in the previous posts.

- Xander

Author:  charsleysa [ Tue Jan 11, 2011 2:06 am ]
Post subject:  Re: Pre Autonomous Task

Its even more foolish not to have an LCD screen!

Author:  mightor [ Tue Jan 11, 2011 2:27 am ]
Post subject:  Re: Pre Autonomous Task


I am not sure who you are or where you're from but you're:
  • Very new to these forum
  • Appear to be about 12-16 years old
  • Fairly intelligent

I would suggest you keep the first point in mind and use the last one to stop trying so hard to make yourself come off as someone who has the answer to everything. Don't call people foolish when you have no idea who they are. You get a much more respect from helping people than making them feel stupid.


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