int button2 = 2;
int button1 = 3;
int air = 5;
int laser = 4;
int status = false;
int lc = false;

void setup(){
pinMode(air, OUTPUT);
pinMode(laser, OUTPUT);
pinMode(button1, OUTPUT); // set the internal pull up resistor, unpressed button is HIGH
pinMode(button2, OUTPUT); // set the internal pull up resistor, unpressed button is HIGH
}

void loop(){{
//a) if the button is not pressed the false status is reversed by !status and the RELAY turns on
//b) if the button is pressed the true status is reveresed by !status and the REALY turns off

if (digitalRead(button1) == true) {
status = !status;
if(status==1){
digitalWrite(air, HIGH);
}
else{
digitalWrite(air, LOW);
}
} while(digitalRead(button1) == true);
delay(50); // keeps a small delay
}

//a) if the button is not pressed the false status is reversed by !status and the LED turns on
//b) if the button is pressed the true status is reveresed by !status and the LED turns off
if (digitalRead(button2) == true) {
lc = !lc;
if(lc==1){
digitalWrite(laser, HIGH);
}
else{
digitalWrite(laser, LOW);
}
} while(digitalRead(button2) == true);
delay(50); // keeps a small delay
}
