#define ON 1
#define MAX 80
//stick this in interrupt

int compressing_time;  //time in current state
if (compressing_time < MAX)
{
compressing_time++; //put somewhere called periodically in code
}
/* find compression state */



compressor_onoff(int compressor switch)
{
if compressor_switch = ON
	{
	if (compression_time => 40 && pneumatic_state != 1)  //now on, was off for 5 			seconds
		{
		compressor_output = 1; //turn on the compressor
		compression_time =compression_time - compression_time;
		}
	else if (
		//now off, was on for 2 seconds
	}

