const int buttonPinA = A0; // the number of the pushbutton pin
const int ledPinA = 11; // the number of the LED pin
const int buttonPin2 = A1;
const int ledPin2 = 10;
// variables will change:
int buttonState1 = 0; // variable for reading the pushbutton status
int buttonState2 = 0;
void setup() {
pinMode(ledPinA, OUTPUT);
pinMode(buttonPinA, INPUT);
pinMode(ledPin2, OUTPUT);
pinMode(buttonPin2, INPUT);
}
void loop() {
// read the state of the pushbutton value:
buttonState1 = digitalRead(buttonPinA);
if (buttonState1 == HIGH) {
// turn LED on:
digitalWrite(ledPinA, HIGH);
} else {
// turn LED off:
digitalWrite(ledPinA, LOW);
}
}
// read the state of the pushbutton value:
buttonState2 = digitalRead(buttonPin2);
if (buttonState2 == HIGH) {
// turn LED on:
digitalWrite(ledPin2, HIGH);
} else {
// turn LED off:
digitalWrite(ledPin2, LOW);
}
}