View Single Post
  #3   Spotlight this post!  
Unread 29-01-2013, 13:47
xForceDee's Avatar
xForceDee xForceDee is offline
Registered User
AKA: Bart Kerfeld
FRC #4239 (Warpspeed)
Team Role: College Student
 
Join Date: Dec 2012
Rookie Year: 2012
Location: Minnesota
Posts: 58
xForceDee is a splendid one to beholdxForceDee is a splendid one to beholdxForceDee is a splendid one to beholdxForceDee is a splendid one to beholdxForceDee is a splendid one to beholdxForceDee is a splendid one to behold
Re: Pneumatics Programming Help

I was also new to java this year so I am glad to finally be on the opposite end of the question for once. All you need to do is put your compressor inside of whatever class you have extending iterative robot. Inside the robotInit method put in compressor.start(). Then leave the shutting off part to your pressure switch. Now make a subsystem for the piston you are using (for me I call ours ShootPiston). Inside the subsystem make two Solenoid objects (one for extend and one for retract). Make three methods (extend, retract, stop) and set the solenoid objects using their set method to true or false depending on what each one is doing. Then make commands to extend and retract and in there call each method respectively. If you need more help with this or if I wasn't clear let me know.
Reply With Quote