Assuming you're using EasyC you want to add something like this to your Operator_Control function
Code:
if(GetOIDInput([joystick port], [button]) == 1){
//Button pressed so drive motor
SetPWM([port], [value]);
}
else{
//Button not pressed stop motor
SetPWM([port], 127);
}
I believe that 3 and 4 are the numbers for the aux1 and 2 but I could be wrong.
__________________
2007 UTC Champions

Thanks 1124 and 558
2007 UTC GM Industrial Design Award
2006 Newton Divisional Winners
2006 Championship finalists
(Thanks 25 and 968 for picking us!)
2006 National Innovation in Control