View Single Post
  #6   Spotlight this post!  
Unread 23-02-2010, 10:57
Omar's Avatar
Omar Omar is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Huntsville, AL
Posts: 122
Omar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of light
Re: Programming Autonomous pneumatic kicker

Quote:
Originally Posted by tanguma26 View Post
in teleop:
1. Button #3 is pressed - back cylinder is cocked back and turns on relay 1
2. After relay 1 shows that the back cylinder is cocked back, the front cylinder goes forward and grabs the kicker
3. relay 3 on the front cylinder than shows that the kicker is ready to shoot
4. Button #1 is pressed - back cylinder shoots out and turns on relay 2
5. After relay 2 is on, front cylinder pulls back, releasing the kicker

(however we have not actually tested it but what we have on the computer, logically should work (we think))
Can you post the part of your Teleop code that deals with items 1 to 5 above and I will look at it and advise from there.

To code your kicker you need to break down the steps even farther.

When you are ready to arm the kicker (the start of Autonomous mode or the end of your driving code)
1. There is no Button #3 to press
2. Solenoid #Back is set True (or False, I don't know which)
3. Back cylinder starts to move.
4. Loop Reading DIO IN #1 (Relay 1) until it True (Back cylinder is cocked).
5. Solenoid #Front is set True (or False, I don't know which)
6. Font cylinder starts to move.
7. Loop Reading DIO IN #3 (relay 3) until it goes True (Front cylinder is extended)
The kicker is armed and ready to kick

If the driving part is done (the robot is at a ball) AND the kicker is ready

THEN in place of pressing Button #1
8. Set Solenoid #Back to False. Back cylinder starts to move
9. Loop Reading DIO In #2 (relay 2) until it goes True
10. Set Solenoid #Front to False. Front cylinder starts to move back kicking the ball

Repeat for next ball
__________________
Omar
Reply With Quote