Go to Post You earn what you work for. - Akash Rastogi [more]
Home
Go Back   Chief Delphi > Other > VEX
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 16-10-2006, 19:22
Nicole_Ypes Nicole_Ypes is offline
Nicole Ypes
FRC #1547 (Waldo)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Waldo!
Posts: 7
Nicole_Ypes is an unknown quantity at this point
Send a message via MSN to Nicole_Ypes
Question Autonomous Switching

Is there anyway a team can switch from a couple of autonomous without reprogramming ie. dipswitch possible with different wiring at all?

Thanks in advance
Reply With Quote
  #2   Spotlight this post!  
Unread 16-10-2006, 19:46
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,800
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Autonomous Switching

Quote:
Originally Posted by Nicole_Ypes
Is there anyway a team can switch from a couple of autonomous without reprogramming ie. dipswitch possible with different wiring at all?

Thanks in advance
Sure. Even a simple jumper on any one of your digital inputs would work.
For example:
Code:
if (rc_dig_in01 == 1) // Can use a simple jumper to pick the autonomous to use
{
	 printf("This is Autonomous_1\r");
	 Autonomous_1();
}
else
{
	 printf("This is Autonomous_2\r");
	 Autonomous_2();
}
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #3   Spotlight this post!  
Unread 29-01-2007, 13:42
JamesBrown JamesBrown is offline
Back after 4 years off
FRC #5279
Team Role: Engineer
 
Join Date: Nov 2004
Rookie Year: 2005
Location: Lynchburg VA
Posts: 1,276
JamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond repute
Re: Autonomous Switching

Quote:
Originally Posted by Mark McLeod View Post
Sure. Even a simple jumper on any one of your digital inputs would work.
For example:
Code:
if (rc_dig_in01 == 1) // Can use a simple jumper to pick the autonomous to use
{
	 printf("This is Autonomous_1\r");
	 Autonomous_1();
}
else
{
	 printf("This is Autonomous_2\r");
	 Autonomous_2();
}
If you want more than 2 modes you can use multiple digital inputs(I like switches more than jumpers but they are essentially the same thing) 1 digital input gives you 2 possible modes, 2 inputs gives you 4, 3 gives you 8 etc.

Another thing you can do is if between the modes you just want to change one variable (ie a delay before the code executes) you can use a pot(potentiometer) connected to an analog input and then tie the input from the pot to a variable in your code.

If you have any other questions just ask.
__________________
I'm Back


5279 (2015-Present)
3594 (2011)
3280 (2010)
1665 (2009)
1350 (2008-2009)
1493 (2007-2008)
1568 (2005-2007)
Reply With Quote
  #4   Spotlight this post!  
Unread 18-02-2007, 12:10
avatarrobodude avatarrobodude is offline
crazy programmer
AKA: Tye Radabaugh
FRC #2068 (Metal Jackets)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Manassas, Virginia
Posts: 5
avatarrobodude is an unknown quantity at this point
Send a message via AIM to avatarrobodude Send a message via Yahoo to avatarrobodude
Re: Autonomous Switching

would anybody happen to know how to make a jumper for the FRC robot controller? like, do we jump from ground to signal?
__________________
My daily diet consists of: brackets for breakfast, pneumatics for lunch, software for dinner, and plastic tubes for dessert.
Reply With Quote
  #5   Spotlight this post!  
Unread 22-02-2007, 16:46
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,800
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Autonomous Switching

Quote:
Originally Posted by avatarrobodude View Post
would anybody happen to know how to make a jumper for the FRC robot controller? like, do we jump from ground to signal?
Yes, just connect signal to ground on a digital input with a jumper that avoids the +5v power pin or use a switch.

The Vex tournaments are restricted to jumpers, but FRC is not.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #6   Spotlight this post!  
Unread 13-03-2007, 00:13
ManicMechanic ManicMechanic is offline
Registered User
AKA: Yolande
VRC #0438 (Metal Gear)
Team Role: Mentor
 
Join Date: Dec 2005
Rookie Year: 2003
Location: CA
Posts: 213
ManicMechanic has a reputation beyond reputeManicMechanic has a reputation beyond reputeManicMechanic has a reputation beyond reputeManicMechanic has a reputation beyond reputeManicMechanic has a reputation beyond reputeManicMechanic has a reputation beyond reputeManicMechanic has a reputation beyond reputeManicMechanic has a reputation beyond reputeManicMechanic has a reputation beyond reputeManicMechanic has a reputation beyond reputeManicMechanic has a reputation beyond repute
Re: Autonomous Switching

Quote:
Originally Posted by JamesBrown View Post
If you want more than 2 modes you can use multiple digital inputs(I like switches more than jumpers but they are essentially the same thing) 1 digital input gives you 2 possible modes, 2 inputs gives you 4, 3 gives you 8 etc.
What do you use for your digital inputs to trigger one mode or another? Limit switches? Bumper switches? And do you use mechanical means to hold them in position (levers that lock the toggles into one position or another)? Or am I making this too complicated?
Reply With Quote
  #7   Spotlight this post!  
Unread 13-03-2007, 07:40
Cody Carey's Avatar
Cody Carey Cody Carey is offline
,':-)
AKA: C. Carey
FRC #0306 (CRT)
Team Role: Alumni
 
Join Date: Feb 2005
Rookie Year: 2004
Location: Corry, PA
Posts: 1,137
Cody Carey has a reputation beyond reputeCody Carey has a reputation beyond reputeCody Carey has a reputation beyond reputeCody Carey has a reputation beyond reputeCody Carey has a reputation beyond reputeCody Carey has a reputation beyond reputeCody Carey has a reputation beyond reputeCody Carey has a reputation beyond reputeCody Carey has a reputation beyond reputeCody Carey has a reputation beyond reputeCody Carey has a reputation beyond repute
Send a message via AIM to Cody Carey Send a message via Yahoo to Cody Carey
Re: Autonomous Switching

What we've been doing is putting a potentiometer on the Operator Interface, marking positions on it... and using it for autonomous selection. Even though your robot is disabled at the beginning of a match, it still reads what value the potentiometer is sending. This allows for unlimited autonomous modes.

The code is just saying that if the value is 0-50, then do one autonomous, and if it is between 50-100 do another, etc. or whatever values you want based on how many auto modes you have.
__________________
Reply With Quote
  #8   Spotlight this post!  
Unread 13-03-2007, 07:59
Unsung FIRST Hero
Mike Betts Mike Betts is offline
Electrical Engineer
no team
Team Role: Engineer
 
Join Date: Dec 2001
Rookie Year: 1995
Location: Homosassa, FL
Posts: 1,442
Mike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond repute
Re: Autonomous Switching

Cody,

I think that you are confusing FRC and FVC...

Mike


Yolande,

Just use the orange jumpers that came in your VEX kit...

Mike
__________________
Mike Betts

Alumnus, Team 3518, Panthrobots, 2011
Alumnus, Team 177, Bobcat Robotics, 1995 - 2010
LRI, Connecticut Regional, 2007-2010
LRI, WPI Regional, 2009 - 2010
RI, South Florida Regional, 2012 - 2013

As easy as 355/113...
Reply With Quote
  #9   Spotlight this post!  
Unread 15-03-2007, 21:21
sovierr's Avatar
sovierr sovierr is offline
Teacher Advisor
AKA: Rich Soviero
FRC #0180 (& FTC 283/284 - SPAM)
Team Role: Teacher
 
Join Date: Nov 2006
Rookie Year: 2006
Location: Jensen Beach, FL
Posts: 63
sovierr is on a distinguished road
Re: Autonomous Switching

You cannot use a potentiometer in Vex. There are none in the vex kits, so any other pot you get would not be a legal Vex part for competition. You can use the Orange jumpers like the previous post suggested. If you've misplaced these, you can use a limit switch with a rubber band or cable tie holding down the switch.
Reply With Quote
  #10   Spotlight this post!  
Unread 15-03-2007, 22:21
nonother's Avatar
nonother nonother is offline
Founder
FTC #3053 (Occam's Engineers)
Team Role: Alumni
 
Join Date: May 2006
Rookie Year: 2006
Location: New Jersey
Posts: 97
nonother will become famous soon enoughnonother will become famous soon enough
Re: Autonomous Switching

Just use the jumpers and it's very trivial. If your microcontroller is in a relatively difficult to reach place, I suggest running some PWM extension cables so you can plug the jumpers in wherever is most convenient.
__________________
I'm planning on volunteering at FTC competitions in the Northeast, hope to see some of you there!

Formerly of FVC3053
2006-2007 Season:
New Jersey Championship Tournament - Amaze Award
Pennsylvania Championship Tournament - Runner-Up Alliance & Inspire Award
World Championship Tournament - Winning Alliance (Alliance Captain) & Inspire Award
Reply With Quote
  #11   Spotlight this post!  
Unread 16-03-2007, 12:34
ManicMechanic ManicMechanic is offline
Registered User
AKA: Yolande
VRC #0438 (Metal Gear)
Team Role: Mentor
 
Join Date: Dec 2005
Rookie Year: 2003
Location: CA
Posts: 213
ManicMechanic has a reputation beyond reputeManicMechanic has a reputation beyond reputeManicMechanic has a reputation beyond reputeManicMechanic has a reputation beyond reputeManicMechanic has a reputation beyond reputeManicMechanic has a reputation beyond reputeManicMechanic has a reputation beyond reputeManicMechanic has a reputation beyond reputeManicMechanic has a reputation beyond reputeManicMechanic has a reputation beyond reputeManicMechanic has a reputation beyond repute
Re: Autonomous Switching

Sorry for the tedious n00bie questions -- I'm not a programmer.

From your code below, I'm assuming that you use the digital input from one of the 16 analog/digital ports to store in your variable. If we want to use Ports #1 & 2 (easiest to distinguish in a hurry), I'm assuming that we would have to reconfigure these as digital inputs. Are there any caveats/disadvantages to doing this, as opposed to using ports #11-16 (already configured as digital inputs by default)?

Does your variable rc_dig_in01 have to be declared anywhere prior using it to store the results of your digital input?

If we want to read a jumper in the interrupt ports instead, what command do we use to access the input from them?

Quote:
Originally Posted by Mark McLeod View Post
Sure. Even a simple jumper on any one of your digital inputs would work.
For example:
Code:
if (rc_dig_in01 == 1) // Can use a simple jumper to pick the autonomous to use
{
	 printf("This is Autonomous_1\r");
	 Autonomous_1();
}
else
{
	 printf("This is Autonomous_2\r");
	 Autonomous_2();
}
Finally, I'm still not seeing the advantage of switches over jumpers from this post. My mental picture of switches sees them as far more complicated than jumpers (attaching limit switches or bumpers and having to anchor them down). What am I missing?

Quote:
Originally Posted by James Brown
If you want more than 2 modes you can use multiple digital inputs (I like switches more than jumpers but they are essentially the same thing) 1 digital input gives you 2 possible modes, 2 inputs gives you 4, 3 gives you 8 etc.
Reply With Quote
  #12   Spotlight this post!  
Unread 17-03-2007, 08:09
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,800
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Autonomous Switching

Quote:
Originally Posted by ManicMechanic View Post
If we want to use Ports #1 & 2 (easiest to distinguish in a hurry), I'm assuming that we would have to reconfigure these as digital inputs. Are there any caveats/disadvantages to doing this, as opposed to using ports #11-16 (already configured as digital inputs by default)?

Does your variable rc_dig_in01 have to be declared anywhere prior using it to store the results of your digital input?

If we want to read a jumper in the interrupt ports instead, what command do we use to access the input from them?
Just to avoid confusing people who are reading this be aware that the example I showed was for programming through MPLAB rather than EasyC. You can do the same thing in EasyC it's just a little different.

You can safely change the default configurations of inputs 1 & 2 to use those for jumpers.
With MPLAB You have to change: Set_Number_of_Analog_Channels(NO_ANALOGS);
The only issue that might change your mind is if you wanted to use an input for an analog sensor rather than digital. The way the Vex controller is designed any analog inputs you use are declared in order before your digital inputs.

If you use MPLAB to program your robot then rc_dig_in01 is defined.
In EasyC you'd drag in "Digital Inputs" from under "Inputs" to check your jumper.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Switching Channels Fred Agnir Control System 5 20-01-2006 20:54
Question about switching autonomous modes DemonYawgmoth Programming 2 23-03-2005 17:02
switching joysticks ten3brousone Control System 1 06-03-2005 20:51
switching joysticks ten3brousone Electrical 1 06-03-2005 20:51
Switching allys? archiver 1999 1 23-06-2002 22:34


All times are GMT -5. The time now is 04:14.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi