View Single Post
  #5   Spotlight this post!  
Unread 10-02-2015, 17:20
rich2202 rich2202 is offline
Registered User
FRC #2202 (BEAST Robotics)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Wisconsin
Posts: 1,192
rich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond repute
Re: Programming Pneumatics in Autonomous

Set a timer, and use some variables.

You use the variables to keep track of where you are/what you want to do.

In autonomousinit (or something like that), you get your parameter for what you are going to do (which autonomous program steps to run), initialize your variables, initialize your pneumatics, etc. This is just like TeleopInit.


Then, like there is a call to Teleop, there is a call to Autonomous.

Inside Autonomous, you have a while loop. Let's say you want to pick up the tote and move to the Auto Zone.

1) Tell your arms to close on the tote. Wait 1 second for the arms to respond
2) Tell your lifter to pick up the tote. Wait 1 second for the lifter to pick it up
3) Whatever commands you need to move the robot and tote to the Autozone.
4) Tell your lifter to lower the tote. Wait 1 second.
5) Tell your arms to open up and release the tote.