Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Arduino IDE demo source code for KC868-SERVER]--#04-Key press code
#1
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);
   }
}
   
   
Reply


Messages In This Thread
[Arduino IDE demo source code for KC868-SERVER]--#04-Key press code - by KinCony Support - 04-22-2022, 01:06 AM

Forum Jump:


Users browsing this thread:
1 Guest(s)