bool pushbutton;
void setup() {
// put your setup code here, to run once:
pinMode(9, OUTPUT);
pinMode(8, OUTPUT);
pinMode(7,OUTPUT);
pinMode(4, INPUT_PULLUP);
}
void loop() {
// put your main code here, to run repeatedly:
// put your main code here, to run repeatedly:
pushbutton=digitalRead(4);
if( pushbutton == LOW)
{
digitalWrite(9,HIGH);
delay(00);
digitalWrite(8,HIGH);
delay(00);
digitalWrite(7, HIGH);
delay(00);
}
else
{
digitalWrite(8,LOW);
digitalWrite(9, LOW);
digitalWrite(7, LOW);
}
}