#define LED 13
#define sw1 2
boolean Sw_Status;
void setup() {
// put your setup code here, to run once:
pinMode(LED, OUTPUT);
pinMode(sw1, INPUT);
}
void loop() {
// put your main code here, to run repeatedly:
Sw_Status = digitalRead(sw1);
if (Sw_Status == LOW)
{
digitalWrite(LED, HIGH);
}
else
{
digitalWrite(LED, LOW);
}
}