pneumatics and joysticks

Here is my question. We have our robot set up to use one joystick driving, so the motors are wired to pwm13 and pwm15 My question is how would I wire and program a pair of pneumatics cylinders so that if the joystick is in the forward position both fire, if the joystick is in the left position one fires and another doesn’t, and so on. My problem is I understand how to make motors move but don’t understand how to make the cylinders fire based on joystick input. Also I don’t know where I’d have to remap the joystick and where to put the code for the pneumatics. Appreciate any info on this.

Well, the cylinders are controlled by relays, and the usage has been described extensively. They have 3 states: Fwd, Rev, 0.
You would need a threshold to represent at what point you fire the relays.

After you figure out relays, go ahead and shoot.

Oh, the first rule of programming: ALWAYS KNOW YOUR CODE.