I can't help you if you're using EasyC, but if you're using Microchip's toolchain, you can program spikes to operate a solenoid and thus control airflow to your cylinders through the relayX global aliases.
For example:
Code:
if(p1_sw_trig) { /* port 1 joystick trigger is depressed */
relay1_fwd = 1; /* Output +12V to your solenoid, allowing air flow in one direction*/
relay1_rev = 0; /* No output to -12V */
} else { /* Trigger released */
relay1_fwd = relay1_rev = 0; /* No output, solenoid changes position and flow reverses */
}
Basically, just use the relays to control +12V and -12V to solenoids or pumps or whatever have you. Never put relayX_fwd and relayX_rev both to 1, however. Sorry if I can't give a better description... I'm totally wiped from last night (got home at 3:45AM after a few disasters...)