Thread: encoders
View Single Post
  #7   Spotlight this post!  
Unread 12-01-2005, 16:23
Tom Bottiglieri Tom Bottiglieri is offline
Registered User
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Jan 2004
Rookie Year: 2003
Location: San Francisco, CA
Posts: 3,187
Tom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond repute
Re: encoders

Hook up your compressor to a spike, so that the red lead is attached to the M+ output and so that the black lead is connected to your ground junction. In your code, turn that relay on and off.

So, if you used relay1, the code would look something like this..

Code:
void TurnOnComp(void)
{
     relay1_fwd=1;
}

void TurnOffComp(void)
{
     relay1_fwd=0;
}