const int buttonPin = 12;
const int ledPinRed = 10;//0
const int ledPinYellow = 9;//1
const int ledPinGrren = 8;//2
int statePin = 0;
int countStep = 0;
boolean b = false;
void setup() {
pinMode(ledPinRed, OUTPUT);
pinMode(ledPinYellow, OUTPUT);
pinMode(ledPinGrren, OUTPUT);
pinMode(buttonPin, INPUT);
}
void loop() {
//digitalWrite(ledPinRed, HIGH);
statePin = digitalRead(buttonPin);
if(statePin == HIGH){
digitalWrite(ledPinRed, LOW);
}else{
digitalWrite(ledPinRed, HIGH);
}
}