View Single Post
  #4   Spotlight this post!  
Unread 25-02-2004, 16:01
Ryan M. Ryan M. is offline
Programming User
FRC #1317 (Digital Fusion)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Ohio
Posts: 1,508
Ryan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud of
Re: Button Programing

Quote:
Originally Posted by Astronouth7303
Can't you do:
Code:
//...
//Init Relays
relay1_fwd = 1;
relay1_rev = 0;
//...
if (OI_Switch)
{
 relay1_fwd = !relay1_fwd;
 relay1_rev = !relay1_rev;
}
Just be sure to only do it again after a certain time. 26.2 ms is still fast, 38 hz fast.
Clever. That would work. Just make sure to have the variables static.
__________________