Diferencia entre revisiones de «Keypad»

De ArduWiki
Saltar a: navegación, buscar
(Página creada con «== Descripción == == Sintaxis == == Parámetros == == Métodos == {| class="wikitable" |+Métodos disponibles librería Keypad.h |- ! Método !! Descripción |- | get...»)
 
(Referencias)
Línea 82: Línea 82:
 
== Referencias ==
 
== Referencias ==
 
* [http://playground.arduino.cc/Code/Keypad Playground]
 
* [http://playground.arduino.cc/Code/Keypad Playground]
 +
* [https://www.luisllamas.es/arduino-teclado-matricial/#targetText=%C2%BFQu%C3%A9%20es%20un%20teclado%20matricial,o%20un%20procesador%20como%20Arduino. Teclado matricial] - Luis Llamas
  
 
[[Category:Librerias]]
 
[[Category:Librerias]]
 
[[Category:Libreria Keypad]]
 
[[Category:Libreria Keypad]]

Revisión del 18:34 7 oct 2019

Descripción

Sintaxis

Parámetros

Métodos

Métodos disponibles librería Keypad.h
Método Descripción
getKey()
getKeys()
getState()
isPressed()
addEventListener()
keyStateChanged()
findKeyInList()
bitMap()
pin_mode()
pin_read()
pin_write
findKeyInList()
setDebounceTime()
setHoldTime()
waitForKey()

Comentarios

Advertencias

Ejemplo 1

#include <Keypad.h>

const byte ROWS = 4;    //filas
const byte COLS = 3;    //columnas
char keys[ROWS][COLS] = {
  {'1','2','3'},
  {'4','5','6'},
  {'7','8','9'},
  {'*','0','#'}
};
byte rowPins[ROWS] = {5, 4, 3, 2}; //Pines para filas
byte colPins[COLS] = {8, 7, 6};    //Pines para columnas

Keypad keypad = Keypad(makeKeymap(keys), rowPins, colPins, ROWS, COLS);

void setup(){
  Serial.begin(9600);
}
  
void loop(){
  char key = keypad.getKey(); 
  if (key){
    Serial.println(key);
  }
}

Vea también


Referencias