Thread: Code error?
View Single Post
  #12   Spotlight this post!  
Unread 13-02-2008, 08:52
SuperBK's Avatar
SuperBK SuperBK is offline
Registered User
AKA: BrianK
FRC #1225 (Amperage Robotics)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Henersonville, NC
Posts: 358
SuperBK is just really niceSuperBK is just really niceSuperBK is just really niceSuperBK is just really nice
Re: Code error?

Sorry to ask the obvious question but,
pwm10? Are you sure you did not mean pwm01?

Try putting in a printf and then let the loader open the terminal window after programming. Leave the programming cable on. (Its a good idea to put blocks under any drive wheels while running with a computer connected to the robot)
Add this line
printf("p1_sw_aux1 = %d, p1_sw_aux2 =%d\r", p1_sw_aux1, p1_sw_aux2);

What buttons are you pressing? The trigger is p1_sw_trig, and the thumb switch is p1_sw_top, I don't think the aux inputs are connected to anything on the joystick.

As for setting the motor to 255, every time in the loop it should always go.


Brian
__________________
Brian K
Team 1225 Robotics Mentor