Answers for "arduino keypad wait for key"

C
0

arduino keypad wait for key

//update instances and possibly fire funcitons
void loop(){
  char key1 = keypad.getKey();
  char key2 = keypad2.getKey();
 
  if (key1 != NO_KEY || key2 != NO_KEY){
    Serial.print("You pressed: ");
    Serial.print(key1 != NO_KEY ? key1 : "nothing on keypad");
    Serial.print(" and ");
    Serial.print(key2 != NO_KEY ? key2 : "nothing on keypad2");
    Serial.println(".");
  }
}
Posted by: Guest on November-06-2020

Code answers related to "C"

Browse Popular Code Answers by Language