#define pinSwitch 2
#define pinRelay 3
void setup() {
// put your setup code here, to run once:
pinMode(pinSwitch, INPUT_PULLUP);
pinMode(pinRelay, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
int ss_Switch=digitalRead((pinSwitch));
if(ss_Switch==0){
digitalWrite(pinRelay,HIGH);
}
else{
digitalWrite(pinRelay,LOW);
}
}