View unanswered posts | View active topics It is currently Thu Oct 30, 2014 1:34 pm






Reply to topic  [ 7 posts ] 
Pre Autonomous Task 
Author Message
Rookie

Joined: Tue Nov 23, 2010 12:33 pm
Posts: 1
Post 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?


Tue Nov 23, 2010 12:46 pm
Profile
Site Admin
Site Admin

Joined: Tue May 15, 2007 9:02 am
Posts: 405
Post 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:

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
  }
  else
  {
    //Run other code
  }
}

_________________
Jesse Flot
CMU Robotics Academy
ROBOTC Support


Tue Nov 23, 2010 2:47 pm
Profile
Moderator
Moderator
User avatar

Joined: Tue Sep 14, 2010 9:19 pm
Posts: 496
Post 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.
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
  }
}

_________________
sudo rm -rf /


Tue Nov 23, 2010 9:05 pm
Profile
Rookie

Joined: Mon Jan 10, 2011 11:39 pm
Posts: 16
Post 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!

_________________
Regards
Stefan Andres Charsley
charsleysa@gmail.com


Mon Jan 10, 2011 11:55 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3227
Location: Rotterdam, The Netherlands
Post 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

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Tue Jan 11, 2011 1:51 am
Profile WWW
Rookie

Joined: Mon Jan 10, 2011 11:39 pm
Posts: 16
Post Re: Pre Autonomous Task
Its even more foolish not to have an LCD screen!

_________________
Regards
Stefan Andres Charsley
charsleysa@gmail.com


Tue Jan 11, 2011 2:06 am
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3227
Location: Rotterdam, The Netherlands
Post Re: Pre Autonomous Task
charsleysa,

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.

Thanks,
Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Tue Jan 11, 2011 2:27 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 7 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.