View Single Post
  #6   Spotlight this post!  
Unread 09-03-2015, 18:20
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: Need help with logic

Just put the flat sequence inside a while loop in Periodic Tasks. Right-click on the edge and add frames as needed.

Each of the "wait until" steps should be implemented as a while loop inside one of the frames. Put the code to read a joystick button or limit switch inside the loop, with the logic set up to stop the loop when the desired condition occurs. Also add a 5-20 millisecond Wait inside the loop, to keep it from running as fast as possible and starving other tasks of CPU time.
Reply With Quote