Problems with Pneumatic Cylinders

Hi all,

We are trying to program our 2012 season robot with C++ and we are doing well so far. (We have the compressor initialized) We are trying to get 3 pistons to work (2 operate a bridge lowering mechanism, and one helps shoot the ball) We cannot get this to work. So our questions are:

  1. How can we tell what port a certain piston relay is on?

  2. Do we use the relay “kOff/kOn” or “kReverse/kForward”

  3. How do we initialize multiple pistons?

Thanks a lot!

P.S. If you want to look at our code repository it’s here

I think we figured it out. Thanks to all for your help! :slight_smile: sarcasm:slight_smile:

Tell me, which would have taught you

  1. How to actually DO all that, and
    B. How to learn how to figure out how to do all that

A. Me answering it, or
2. you finding it on your own.

hint: search is your friend…:rolleyes:

First, sorry for the sarcasm above.

Second, I have searched all over the place (Google, the forums, etc.) and did not find out how to tell what ports certain mechanisms were plugged into, and still don’t know. The only way I could figure them out is by looking back at previous code.

My other problem is that I was using relay classes to operate the pistons, when only one of them runs on a relay. We are now using the solenoid classes, but now our drive functions are reversing directions (unrelated, but I thought I’d mention it)