Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Programs question (http://www.chiefdelphi.com/forums/showthread.php?t=23889)

AlphaOmega870 14-01-2004 16:48

Programs question
 
How do you load multiple programs onto the Robot Controller? And also how do you use digital/analog inputs? Thank you in advance.

Tom Bottiglieri 14-01-2004 17:02

Re: Programs question
 
by loading multiple programs.. im inferring that u mean different autonomous prgms.. what we are doing and what we did last year was put a simple switch that would turn the digital io pins high or low.. then u can open up the user_routines.h file and change the aliases of the pins to different things (ex: program1)..then by using that u could set up a simple if then situtation to load ur auto based on what the switch is turned to

ex..
if (program1 = 1)
{add ur code here}
elseif (program2 = 1)
{whatever else, u get the idea)

deltacoder1020 15-01-2004 01:42

Re: Programs question
 
using the digital/analog inputs is fairly simple, look in ifi_aliases.h to find the macros that correspond to the various pins for the digital inputs, and the various channels for the analog inputs. remember that for an analog input, you'll need to use Get_Analog_Value() (i think that's the name... don't have the reference handy) to retrieve the actual value.

as for multiple programs, if you had a laptop you could simply bring the programming cable and download programs on the spot, or you could do what was suggested and create a "meta-program", that essentially is two different programs combined with an if-else statement.

Adam Shapiro 15-01-2004 08:23

Re: Programs question
 
Last year we added 3 toggle switches onto our control board for program control. During the disabled mode before the match the robot can read (but not use) input from the controller. We were able to use this to our advantage to give us an option of 7 programs which could be selected and changed up to the last second before the horn started the match. It was very useful for those times when you forget the strategy and select the wrong program!!


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

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