YouTube member AlmightyArjen has published details and a video of an awesome LEGO pneumatic compressor which has been automated using a little Arduino programming and hardware. Watch the demonstration ...
This is a basic Arduino code which will allow you to drive the pressure of the pneumatic actuator to a certain value, as well as printing the debug value on the Serial Monitor every 200ms.
Pneumatic stepper motors are controlled using pneumatic valves, which can be commercial 5/2-way valves (e.g. PV5211-24VDC-1/8 or Festo stuff etc) or low-cost RC servo ...