int LED=2;
int sw=4;
void setup() {
// put your setup code here, to run once
pinMode(LED,OUTPUT);
pinMode(sw,INPUT);
}
void loop() {
if(digitalRead(sw))
{
digitalWrite(LED,LOW);
}
else
{
digitalWrite(LED,HIGH);
}
// put your main code here, to run repeatedly:
// this speeds up the simulation
}