|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
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.
|
|
#2
|
|||
|
|||
|
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) |
|
#3
|
||||
|
||||
|
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. |
|
#4
|
|||||
|
|||||
|
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!!
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| A question about control system options | computhief263 | Control System | 7 | 04-02-2004 14:46 |
| my idea of a question forum... | Ken Leung | General Forum | 12 | 30-11-2002 12:17 |
| MnM EASY Question of the Day Winners! | Mike Bonham | General Forum | 22 | 03-05-2002 21:21 |
| A quick question | Joelster | Technical Discussion | 6 | 10-02-2002 09:09 |
| Rookie Programmer has question about the default code | DanL | Programming | 3 | 26-01-2002 19:59 |