Pneumatic Code Python

def hooks_extend():
    RIGHTHOOK.set(True)
    LEFTHOOK.set(True)

def hooks_retract():
    RIGHTHOOK.set(False)
    LEFTHOOK.set(False)

controller_1.buttonRight.pressed(hooks_extend)
controller_1.buttonY.pressed(hooks_retract)

I do believe that this is correct but is this the proper way to code pneumatics in python. Extend is what I want it to be with the pistons extended and retract is retracted. These are type one pistons.

I’m assuming you mean “single acting cylinders”. But actually, there’s no difference in the logic/code for single acting or double acting cylinders; the only difference is in the hardware.

Yeah sorry we call them type ones and type twos