int Button1Pin = 3;
int Button1Value = 0;
int Button2Pin = 4;
int Button2Value = 0;
int LEDPin = 2;
void setup() {
// put your setup code here, to run once:
pinMode(Button1Pin, INPUT);
pinMode(Button2Pin, INPUT);
pinMode(LEDPin, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
Button1Value = digitalRead(Button1Pin);
Button2Value = digitalRead(Button2Pin);
if ((Button1Value != 0) && (Button2Value != 0))
digitalWrite(LEDPin, HIGH);
else
digitalWrite(LEDPin, LOW);
}