View Single Post
  #6   Spotlight this post!  
Unread 10-02-2014, 18:38
DarthMaulCIS DarthMaulCIS is offline
Registered User
FRC #4607
 
Join Date: Jan 2014
Location: Becker, Minnesota
Posts: 24
DarthMaulCIS is an unknown quantity at this point
Re: Coding in a sequence.

Quote:
Originally Posted by Mark McLeod View Post
I wouldn't put the sequence you describe into Teleop.
It'd be easier on you to put a sequence like you describe into Periodic Tasks.

So, your sequence can be thought of as these discrete frames:
  1. Retract solenoid; Wait 500ms (half a second to give the retraction time to complete)
  2. Set Winch motor to speed (1.0); Wait 3000ms (or however long it takes the winch to do it's work)
  3. Set Winch Motor to 0 speed
  4. When does the solenoid get extended to complete the cycle?
Here's an example of something similar:
If I put this in my code (adjusting for time and the parts i want to call) would it work?
Reply With Quote