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