//Coded By: Nitin Rajput
const int pinOFswitch = 3;
void setup() {
pinMode(pinOFswitch, INPUT);
pinMode(8, OUTPUT);
}
void loop() {
int ValueOFswitch;
ValueOFswitch = digitalRead(pinOFswitch);
if (ValueOFswitch == HIGH)
{
digitalWrite(8, HIGH);
}
else
{
digitalWrite(8, LOW);
}
}