Thread: Forgetful robot
View Single Post
  #9   Spotlight this post!  
Unread 21-01-2008, 12:32
xrabohrok's Avatar
xrabohrok xrabohrok is offline
hunter of errors
FRC #1208 (The Metool Brigade)
Team Role: Programmer
 
Join Date: Jan 2006
Location: O'Fallon
Posts: 62
xrabohrok is an unknown quantity at this point
Re: Forgetful robot

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

my modifications are as follows:

Code:
  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.
__________________
"It's programming's fault" may be a viable excuse for just about everything, except the robot falling apart.

It will 'cause it can!

constants aren't. variables won't.