int light=27;
int switch1=17;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
pinMode(switch1, INPUT);
pinMode(light, OUTPUT);
}
void loop() {
int switch1input=digitalRead(switch1);
if(switch1input==1){
digitalWrite(light, HIGH);
}
else{
digitalWrite(light, LOW);
}
// put your main code here, to run repeatedly:
delay(10); // this speeds up the simulation
}