Librería para teclados Matriciales 4x4
Dependencies: TextLCD keypad mbed
Fork of teclado by
main.cpp
- Committer:
- jyrodriguezg
- Date:
- 2015-06-07
- Revision:
- 1:846d51d88013
- Parent:
- 0:d3c549ccf52b
File content as of revision 1:846d51d88013:
#include "mbed.h" #include "TextLCD.h" #include "keypad.h" TextLCD lcd(PTE5, PTE4, PTE3, PTE2, PTB11, PTB10); // rs, e, d4-d7 char Keytable[] = {'1','2','3','A', '4','5','6','B', '7','8','9','C', '*','0','#','D'}; char Index; uint32_t cbAfterInput(uint32_t index) { Index=index; lcd.locate(0,0); lcd.printf(" Teclado"); lcd.locate(0,1); lcd.printf("Index:%d =>key:%c ",Index,Keytable[Index]); return 0; } int main() { Keypad keypad(PTA12,PTD4,PTA2,PTA1,PTC9,PTC8,PTA5,PTA4); keypad.CallAfterInput(&cbAfterInput); keypad.Start(); while (1) { } }