int count=0;
int button;
void setup() {
pinMode(2, INPUT);
pinMode(8, OUTPUT);
pinMode(13, OUTPUT);
button=digitalRead(2);
}
void loop() {
if(button!=digitalRead(2)){
count+=digitalRead(2);
if(count>=3){
count=0;
}
button=digitalRead(2);
}
if(count==0){
digitalWrite(13, LOW);
digitalWrite(8, LOW);
}
if(count==1){
digitalWrite(13, HIGH);
}
if(count==2){
digitalWrite(8, HIGH);
}
delay(10);
}