Run motor for a set amount of depending of Pressure Sensor
Fairly easy.

You have to determine if the pressure has changed from its previous reading.

If it has, you can start to turn the motor for two seconds. 

Once the time is up, turn the motor off.

Once you put your code in that framework, it would be much easier to code top down.