04-22-2022, 01:06 AM
(This post was last modified: 04-22-2022, 01:21 AM by KinCony Support.)
Code:
void setup() {
Serial.begin(9600);
pinMode(0,INPUT);// Key S5 is connected to IO0 set IO0 to input mode
}
void loop() {
if(digitalRead(0)==LOW){
Serial.println("Key S5 Pressed!");
delay(100);
}
if(digitalRead(0)==HIGH){
Serial.println("Key S5 Not Pressed!");
delay(1000);
}
}