|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Autonomous selector
I was wondering if there is a way to read from the OI, before autonomous, a value. We are coding multiple autonomous functions and I need a way to select which one to run. We can't put it on the robot because we have no inputs left. We have 1 completely unused port on the OI if that helps.
Thanks, Garrett Team 41 |
|
#2
|
|||||
|
|||||
|
Re: Autonomous selector
When the robot is disabled before autonomous you can read the OI switches. Set a (static) variable from one of those switches, and then you can choose your mode from that in autonomous.
It's pretty similar to reading one off the robot. |
|
#3
|
||||
|
||||
|
Re: Autonomous selector
It's written by Kevin Watson. We used a slightly modified version of it.
Quote:
AUTON_UP/DOWN are the defines to which a joystick button or something similar. Last edited by 6600gt : 01-02-2007 at 19:04. |
|
#4
|
|||
|
|||
|
Re: Autonomous selector
We put little switches (the ones that go from 0-9) on the robot and hook them up to the dig in. Before each match, we set the autonomous mode by hand.
|
|
#5
|
||||
|
||||
|
Re: Autonomous selector
Quote:
You'll be seeing something more advanced this year though if all goes to plan ![]() |
|
#6
|
||||
|
||||
|
Re: Autonomous selector
We used a little toggle switch on the robot last year.
if(rc_dig_in01 == 0) { run_blocking_auton() } else { run_shooting_auton() } |
|
#7
|
|||||
|
|||||
|
Re: Autonomous selector
You used all 18 digital I/O pins?! Holy cow batman.
|
|
#8
|
||||
|
||||
|
Re: Autonomous selector
The code that I posted previously, written by Kevin Watson, allows you have have 254 autons, that can be seen in the user display(the number) of the OI! Beats soldering any switches... We have been using this for the last 4 years at all competitions.
Last edited by 6600gt : 02-02-2007 at 12:23. |
|
#9
|
|||
|
|||
|
Re: Autonomous selector
We used 16 of them, that only leaves 2 open. That can only make 4 combinations, but we need 5.
6600GT thanks for the tip. I'll be doing that this year as the selector. Thank you everyone for your help. |
|
#10
|
||||
|
||||
|
Re: Autonomous selector
Use the trigger and thumb to set the autonomous mode. Pull the trigger and goto the next number. You can have the OI display what mode you have selected.
|
|
#11
|
||||
|
||||
|
Re: Autonomous selector
Do you have any analog inputs left? If so, you should be able to use a 5 position toggle switch with 5 different value resistors as a sort of multiplexor. Just read the analog value and determine auto mode that way.. i think. im no programmer though ; )
|
|
#12
|
|||||
|
|||||
|
Re: Autonomous selector
We usedd this same technique to make rotary switches for our OI that used one analog input for various purposes and it works fine. The programming part of it is really simple as well.
|
|
#13
|
|||
|
|||
|
Re: Autonomous selector
Our team (MVRT) has a keypad that takes up one whole port. The keypad is coded in assembly and has its own circuit board and the lcd screen is powered by regular AA batteries. The keypad allows us to have 64 different autonomous positions and choose which alliance we are and which position we are in.
|
|
#14
|
|||||
|
|||||
|
Re: Autonomous selector
Quote:
|
|
#15
|
|||||
|
|||||
|
Re: Autonomous selector
Does anyone have any multiple autonomous code for easy-C?
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help with Selector Switch | Slick | Programming | 2 | 16-02-2005 16:09 |
| [OCCRA]: hose clamps on drill transmissions' gear selector? | greencactus3 | OCCRA Q&A | 1 | 06-10-2004 05:28 |
| Beacon selector switch? How to find/make? | Fen | Programming | 13 | 12-02-2004 16:31 |
| Team selector switches on ISAAC | Lloyd Burns | Robotics Education and Curriculum | 0 | 17-12-2002 08:32 |
| Channel Selector | David Kelly | Technical Discussion | 6 | 03-06-2001 01:15 |