int led = 7;
int flip = 8;
int switchstatus;
void setup() {
// put your setup code here, to run once:
pinMode(led, OUTPUT);
pinMode(flip, INPUT);
}
void loop() {
// put your main code here, to run repeatedly:
switchstatus = digitalRead(flip);
if (switchstatus == 1)
digitalWrite(led, HIGH);
else
digitalWrite(led, LOW);
}