2001 2002 in Automous

can the 2001 2002 controllers (oi and rc) support autonomous modes like 2003 and 2004?

No they cant with out any modifications to the circuitry and firmware.

I know for a fact back in 2003, you were able to send in your old RC to InnovationFIRST and they would do an update for you. I’m not sure if they offered this service this year, but I think its worth asking them about.

We sent in our 02 controller to IFI and they updated it to the 2003 specs just for practicing…obviously since thye are different setups in 03/04 you wouldnt be able to use it competition wise

Theres only certain ones that can be updated. Somthing with your serial number said if you could update or not.

The robot controller will not enforce autonomous by neutralizing the operator interface inputs before your user program sees them. You are free, however, to ignore data from the OI.

You could set up a switch on the OI which would initiate autonomous operations. (I haven’t tried it, but it is conceivable that pin 5 of the competition port may actually be passed in the PB_mode byte, so that you might be able to use the same competition port dongle you already have… You do have one, don’t you? :confused: )

dongle is not a word im familiar with but if u mean a competition port box that allows for channel change, autonomous mode, and disable functions then yes i do if not then help me out

[quote=“SpaceOsc”]
dongle is not a word * familiar with but if u mean a competition port box that allows for channel change, autonomous mode, and disable functions then yes i do if not then help me out
*

Yep. That’s what I’m talking about. Many teams (ours included) made their “box” compact enough to fit in a serial port connector shell. Something like that is what is referred to as a dongle.[/quote]

Despite what others say, the old OI & RC are capable of autonomous mode. See this thread for an old post of mine on the issue http://www.chiefdelphi.com/forums/showpost.php?p=148855&postcount=11

ahhh someone would know thank you

Wouldn’t it be possible to create a joystick trigger to start an “autonomous” mode. I think that something like this would be usable (its in C, its just for the basic idea):


/* Global Variables */
toggled = 0;
previous_toggle = 0;
clock_counter = 0;

/* Checks if the trigger is toggled */
void Default_Routine()
{
if (p1_sw_trig == 1 & previous_toggle == 0)
     {
     toggled = 1;
     run_auto = 1;
     }
     previous_toggle = p1_sw_trig;

if (run_auto & clock_counter <= 225) /* ~15 seconds in slow loop */
     {
     clock_counter++;
     /* Place "Autonomous" code here */
     }
}
if (counter > 225)
     counter = 0;

if (!run_auto)
     {
     /* Regular robot code here */
     }

You could also do one that would last until the trigger is pressed again:


/* Global Variables */
toggled = 0;
previous_toggle = 0;

void Default_Routine()
{
/* Checks if the trigger is toggled */
if (p1_sw_trig == 1 & previous_toggle == 0)
     {
     toggled = 1;
     run_auto = 1;
     }
     previous_toggle = p1_sw_trig;

if (p1_sw_trig == 1 & run_auto == 1)
     {
     toggled = 0;
     run_auto = 0;
     }

if (run_auto)
     {
     /* Place "Autonomous" code here */
     }
}

if (!run_auto)
     {
     /* Regular robot code here */
     }

Now these would be slower than a real processor with autonomous because of the If statements. Also, a heads up to the NRG Code Repository for the trigger toggler code.

Here I’ve made an attempt at re-writting this code in PBasic for the 2001-2002 controllers, here is the section of code, it SHOULD work, but I have no method of testing it right now. Also, for this to work, the variables “toggled” “prev_toggle” and “run_auto” must be created and initially set to 0.


  IF (p1_aux = 1) & (prev_toggle = 0) THEN Toggler:
  Toggler:
    toggled = 1
    run_auto = 1
  prev_toggle = p1_aux

  IF (p1_aux = 1) & (run_auto = 1) THEN StopAuto:
  StopAuto:
    toggled = 0
    run_auto = 0

  IF (run_auto = 1) THEN GoAuto:
    driveR = (((2000 + p1_y + p1_x - 127) MIN 2000 MAX 2254) - 2000)
    driveL = (((2000 + p1_y - p1_x + 127) MIN 2000 MAX 2254) - 2000)
  GoAuto:
   ' Autonomous Code Goes Here

Just place this code into the drive section and hopefully it will work. I don’t have much experience with PBasic, so if there are any errors, please tell me.

i think i remember somethign at the 2002 nationals where a robot won an award for autonomously grabbing the goals…

I am not sure that you could cause autonomous mode to initiate through some signal to the competition port, but it would be possible to create an autonomous mode that ran off of the joystick. This is how i tested our autonomous.

I made my autonomous code simply a function. I called it once in the autonomous mode section, and once with an iff statement that ran only if p4_wheel was greater than a certain value. Here is an example.

if (p4_wheel > 200)
     My_Autonomous();