View Single Post
  #2   Spotlight this post!  
Unread 30-01-2013, 23:35
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Programming Window Motor with Timer

Do it in two parts. The first part is to read the button, and whenever the button is pressed set a value to be one second in the future. Leave the value alone when the button is not pressed. The second part is to compare the current time to that value, turn on the motor whenever the value is in the future, and turn off the motor whenever the value is in the past.

I figure you'll have some specific questions to ask now. I'm willing to give specific answers to them. Ask away!
Reply With Quote