View Single Post
  #2   Spotlight this post!  
Unread 03-02-2008, 14:30
psy_wombats's Avatar
psy_wombats psy_wombats is offline
Registered User
AKA: A. King
FRC #0467 (Duct Tape Bandits)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Shrewsbury MA
Posts: 95
psy_wombats has a spectacular aura aboutpsy_wombats has a spectacular aura aboutpsy_wombats has a spectacular aura about
Re: Programing joystick buttons

The joystick buttons should follow this sort of naming convention:

Code:
p1_sw_aux1
p1_sw_aux2
p1_sw_trig
p1_sw_top
Then just change the number of the port. You may want to look at ifi_frc.h. Everything's in there.

You should be able to work these with a simple if statement, something like:

Code:
if (p1_sw_aux1){
pwm01=255;
} else {
pwm01=127;
}