const int Sw1 = 2;
const int Led1 = 10;
const int Sw2 = 3;
const int Led2 = 9;
void setup() {
// put your setup code here, to run once:
pinMode(Sw1, INPUT);
pinMode(Led1, OUTPUT);
pinMode(Sw2, INPUT);
pinMode(Led2, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
if(digitalRead(Sw1) == LOW) {
digitalWrite(Led1,HIGH);
}
if (digitalRead(Sw1) == LOW) {
digitalWrite(Led2,HIGH);
}
else
digitalWrite(Led1,LOW);
digitalWrite(Led2,LOW);
}