arduino keypad wait for key

Solutions on MaxInterview for arduino keypad wait for key by the best coders in the world

showing results for - "arduino keypad wait for key"
Belle
06 Nov 2017
1//update instances and possibly fire funcitons
2void loop(){
3  char key1 = keypad.getKey();
4  char key2 = keypad2.getKey();
5 
6  if (key1 != NO_KEY || key2 != NO_KEY){
7    Serial.print("You pressed: ");
8    Serial.print(key1 != NO_KEY ? key1 : "nothing on keypad");
9    Serial.print(" and ");
10    Serial.print(key2 != NO_KEY ? key2 : "nothing on keypad2");
11    Serial.println(".");
12  }
13}
14