//Pin assignments
const int ledPin = 13;
const int switchPin = 2;
//Variable to store the store the state of the LED
bool LEDstate = false;
void setup()
{
pinMode(ledPin, OUTPUT);
pinMode(switchPin, INPUT);
}
void loop()
{
if(digitalRead(switchPin)== HIGH){
digitalWrite(ledPin, HIGH);
}
else{
digitalWrite(ledPin, LOW);
}
}