You are on page 1of 1

int buttonPin1=3;

int buttonPin2=5;
int LEDgreen=11;

int A;
int B;

void setup() {
pinMode(LEDgreen, OUTPUT);
pinMode(buttonPin1, INPUT_PULLUP);
pinMode(buttonPin2, INPUT_PULLUP);

void loop() {
A=digitalRead(buttonPin1);
B=digitalRead(buttonPin2);

A=!A;
B=!B;

if (A !=B){
digitalWrite(LEDgreen, LOW);
}else{
digitalWrite(LEDgreen, HIGH);
}

You might also like