Code: Select all
void setup() {
Serial.begin(115200);
pinMode(27,INPUT);
pinMode(23,OUTPUT);
pinMode(19,OUTPUT);
digitalWrite(19,HIGH);
}
void loop() {
Serial.println(digitalRead(27));
delay(100);
if (digitalRead(27)==1){
digitalWrite(23,HIGH);
}
digitalWrite(23,LOW);
}