![]() |
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 |
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. |
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. |
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.
|
Re: Autonomous selector
Quote:
You'll be seeing something more advanced this year though if all goes to plan ;) |
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() } |
Re: Autonomous selector
Quote:
|
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.
|
Re: Autonomous selector
Quote:
6600GT thanks for the tip. I'll be doing that this year as the selector. Thank you everyone for your help. |
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.
|
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 ; )
|
Re: Autonomous selector
Quote:
|
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.
|
Re: Autonomous selector
Quote:
|
Re: Autonomous selector
Does anyone have any multiple autonomous code for easy-C?
|
| All times are GMT -5. The time now is 03:57. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi