Forgetful robot

Our team’s robot has finally been assembled (well, the chasis anyway) and the came to load the code. When the code was loaded, it did fine. But when we turned it off and then back on, the robot went crazy, defaulting to a bizarre control scheme were the x direction of a undefined joystick controls half of the robot.:ahh: I would like to think it is the backup battery, but it seems to be fine. Does anyone have suggestions?

are you sure nothing changed? no pwms moved, no joysticks changed? Check the joystick trims? honestly, if reloading the code and checking your wiring setup doesn’t fix the problem, then it might be a coding error.

I’m quite sure. The control scheme is correct when the code is first loaded, but turning off the robot makes it go crazy. When the robot does that, control for two wheels go to the auxilary joystick, in the x directions. trim is not an issue when this happens. The code does not change.

Using the “select” button on your operator interface, switch to the battery voltage and report back here. What base code are you using? Are you getting the red-light-of-death (program state LED on the robot controller is red)?

-Kevin

check if your main battery i charged. we were testing omni code and it was going crazy. after 1hr of messing with our code, we realized it was a low battery.

It looks like I spoke too soon. Changing the main battery fixes it temporarily but turning it on and off gets the crazyness back.

The operator interface puts out crazyness as well:
c40
0003
quickly switching between u056 and u008 and u024.

Testing the battery with a multi-meter yields the battery at 12 v.

all lights on the control board were green.

are the controllers trimmed?
that happened to us a few times

What base code are you using and what, if any, modification have been made to it?

-Kevin

I am using 2007 frc_serial_ports version of the code from kevin.org.

my modifications are as follows:


  pwm01 = joystick_values[p1_y];   
  pwm02 = joystick_values[p2_y];   
  pwm03 = joystick_values[p3_y];   
  pwm04 = 127; //p4_y;   
  pwm05 = 127; //p1_x;   
  pwm06 = 127; //p2_x;   
  pwm07 = 127; //p3_x;   
  pwm08 = 127; //p4_x;   
  pwm09 = 127; //p1_wheel;
  pwm10 = 127; //p2_wheel;   
  pwm11 = 127; //p3_wheel;   
  pwm12 = 127; //p4_wheel;  

joystick_values is a 256 element global array with each element a value that the pwm should be in relation to the joystick value. We have been using that array the same way for 4 years (its kind of a hand me down).

The robot seems to go crazy at random now. It start and stop being crazy without loading the code.

This is on a 2008 controller? Does it work correctly with unmodified code? Before you do anything else, can you please send me your .map file?

As a possible solution, try this and report back with the results. Also make sure you’re using the attached linker script (delete the .txt part, then drop into your build directory).

-Kevin

18f8722.lkr.txt (1.79 KB)


18f8722.lkr.txt (1.79 KB)

The select button cycles through channel number, team number, battery voltage and “user number”. When first powered on, the user number should display the version of the code on the master processor. (After a few seconds, it displays whatever the user processor wants to display.)

What version of the master code are you running? The latest version (I believe) is version 15, and can be downloaded from IFI at the bottom of the FRC Robot Controller page. The direct link is: http://www.ifirobotics.com/docs/frc-master-ver15.zip

Since no one else has suggested it, I’ll suggest that you try re-downloading the master code. After doing so, you will also need to re-download your user code.