Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   setting autonomous mode (http://www.chiefdelphi.com/forums/showthread.php?t=26550)

Allison 08-03-2004 15:52

setting autonomous mode
 
is it allowed to have something like a switch or jumpers on your OI to set your autonomous mode or does it have to be done on the robot? if not how do we choose the autonomous mode we want?

thanks in advance
allison

Ryan M. 08-03-2004 16:03

Re: setting autonomous mode
 
Quote:

Originally Posted by Allison
is it allowed to have something like a switch or jumpers on your OI to set your autonomous mode or does it have to be done on the robot? if not how do we choose the autonomous mode we want?

thanks in advance
allison

Somebody will have to correct me if I'm wrong, but the way the code is, I believe that you read the inputs from the OI once before you enter autonomous mode. However, I'm not sure if the OI will actually send anything to the robot.

The safe way is to have switches on the robot that you set to indicate which autonomous mode you want. Your program then reads these and figures out what you want it to do from them.

Alan Anderson 08-03-2004 16:39

Re: setting autonomous mode
 
Quote:

Originally Posted by Allison
is it allowed to have something like a switch or jumpers on your OI to set your autonomous mode or does it have to be done on the robot?

We've got a rotary switch on our OI that selects from the menu of autonomous options. The OI inputs do get passed to the robot during the disabled period before autonomous mode begins, so you can read the mode selection and store it somewhere to be used during
autonomous mode. The OI won't be active while autonomous mode is underway -- default values will be transmitted to the robot -- so you'll have to make sure not to accidentally try to read the mode selection after the match begins.

Astronouth7303 08-03-2004 17:50

Re: setting autonomous mode
 
I read it when Default_Routine() is ran. Then I store it to a variable and use that in User_Autonomous_Code().

ultramrw21 08-03-2004 18:47

Re: setting autonomous mode
 
We have three binary switches on the robot to select one of the 8 auto modes. Its worked well so far, but it took a while to explain it to the drivers that set the robot before a round.

MikeDubreuil 08-03-2004 18:54

Re: setting autonomous mode
 
Quote:

Originally Posted by ultramrw21
We have three binary switches on the robot to select one of the 8 auto modes. Its worked well so far, but it took a while to explain it to the drivers that set the robot before a round.

We do the same thing. What we do is make a sheet your coach (or drivers) can look at which has the program numbers in decimel, along with the names. Then next to the decemel number indicate which swithes need to be on or off to input that decimel number.

jacob_dilles 08-03-2004 19:42

Re: setting autonomous mode
 
i was wondering if anyone had any sucess with reading switches off the OI after the match had started and before autonomus was enabled?

KenWittlief 08-03-2004 19:54

Re: setting autonomous mode
 
team update 13 said the OI values are read when the bot is diabled, so you should be able to send them from there

I dont think we have enough switches left free on the OI - we have 4 switches onthe bot tied to the rc_dig_inputs to tell it what to do in auton mode

the most important one you MUST have is a disable - sooner or later you are going to want to sit out auton mode.

jacob_dilles 08-03-2004 19:58

Re: setting autonomous mode
 
well currently were only using 2 joystics... that leaves 8 switches open, thats like 64 programs or watever. so i could have done it that way. but there are two big red togle switches on the robot that are clearly labled "disable/enable autonomus" and "knock ball/dont knock ball". it makes it pretty easy. we have 4 digital IOs on the rc left; with just 2 banner sensors. next year i hope they give us more inputs!

deltacoder1020 08-03-2004 20:35

Re: setting autonomous mode
 
Quote:

Originally Posted by jacob_dilles
well currently were only using 2 joystics... that leaves 8 switches open, thats like 64 programs or watever. so i could have done it that way. but there are two big red togle switches on the robot that are clearly labled "disable/enable autonomus" and "knock ball/dont knock ball". it makes it pretty easy. we have 4 digital IOs on the rc left; with just 2 banner sensors. next year i hope they give us more inputs!

2^8 = 256 :)

jacob_dilles 08-03-2004 20:37

Re: setting autonomous mode
 
lol shush im writing a history paper and CDing at the same time. not thinking using the right part of my brain :p


All times are GMT -5. The time now is 00:12.

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