Thread: Forgetful robot
View Single Post
  #10   Spotlight this post!  
Unread 21-01-2008, 13:27
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: Forgetful robot

Quote:
Originally Posted by xrabohrok View Post
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.
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
Attached Files
File Type: txt 18f8722.lkr.txt (1.8 KB, 57 views)
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org