Go to Post You can never have too many backups. - Venkatesh [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #16   Spotlight this post!  
Unread 26-04-2004, 17:25
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
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,860
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: Multiple Auton's

Here are two ways teams I helped accomplished it this year.

1) Use a BCD style rotary switch available from Digi-Key (hooked to digital input pins 15-18 in this case). 16 choices using 4 digital input pins or 8 choices using 3 pins. The extra selections were used for diagnostic software rather than have so many autonomous programs.
Code:
static unsigned int swtc; //set equal to the switch input
 
swtc = PORTJ>>4; // Auto select switch 0-15
switch(swtc) 
{
	case 0: 
	default:
		AUTO_0();
		break;
 
	case 1: 
		AUTO_1();
		break;

}

2) Use a regular Radioshack style mechanical rotary switch. In this case a 6-position switch hooked to digital input pins 11-16.
Code:
if (!rc_dig_in11)
{
	 Auto_1();
}
else if (!rc_dig_in12)
{
	 Auto_2();
}
...
else
{
	 Auto_1();
}
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 26-04-2004 at 17:29.
 


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
multiple definition error in MCC/Linker (possible bug?) wun Programming 5 01-04-2004 17:49
Multiple programs/autonomous routines galewind Programming 12 09-01-2004 22:25
question for teams created among multiple high schools archiver 2001 20 24-06-2002 03:58
multiple e-mail notifications srawls CD Forum Support 3 23-05-2002 12:55
Multiple Regional Winners and a little jab JamesJones General Forum 32 10-04-2002 23:38


All times are GMT -5. The time now is 16:52.

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