Thread: Aux 1 & 2
View Single Post
  #2   Spotlight this post!  
Unread 12-02-2007, 14:59
Imajie Imajie is offline
Registered User
AKA: James Letendre
FRC #0195 (Cyber Knights)
Team Role: Electrical
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Southington
Posts: 114
Imajie has much to be proud ofImajie has much to be proud ofImajie has much to be proud ofImajie has much to be proud ofImajie has much to be proud ofImajie has much to be proud ofImajie has much to be proud ofImajie has much to be proud of
Send a message via AIM to Imajie
Re: Aux 1 & 2

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