Control Air Pump Depending on Pressure Sensor
So you basically want a hysteresis control for the air pump. 

const int lowerLimit;//fill in as needed
const int upperLimit;

void loop(){
    int pressure = readPressureSensor();
    if(pressure &lt; lowerLimit) turnPumpOn();
    if(pressure &gt; upperLimit) turnPumpOff();

}


The helper functions I used should be easy to implement based on the tutorials you found.