View Single Post
  #12   Spotlight this post!  
Unread 21-02-2006, 13:04
comwiz7's Avatar
comwiz7 comwiz7 is offline
Registered User
AKA: Joey
FRC #1323 (Madtown Robotics 1323)
Team Role: Alumni
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Madera
Posts: 66
comwiz7 will become famous soon enoughcomwiz7 will become famous soon enough
Send a message via MSN to comwiz7
Re: Relay Programming Questions...

I have already tried the exact same thing you are doing with this and surprisingly, it didn't work. But with lots of trys we finally found something that did:
if(!p4_sw_trig){
if(counter1 > 9 & counter1 < 61)
{
counter1++;
}
else if(counter1 < 10 || counter1 > 60)
{
counter1 = 0;
}
} else if(p4_sw_trig){
if(counter1 < 1000)
counter1++;
}
if(counter1 == 10)
{
relay4_fwd = !relay4_fwd;
}
if(counter1 == 30)
{
relay3_fwd = !relay3_fwd;
}
if(counter1 == 50)
{
relay3_fwd = !relay3_fwd;
}
if(counter1 == 60)
{
relay4_fwd = !relay4_fwd;
}

I don't know why this worked and that didn't but it works and I'm happy. Thanks, everybody, for helping out.