![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
key table
Dependencies: FPointer keypad mbed
main.cpp
- Committer:
- ficofer
- Date:
- 2012-10-16
- Revision:
- 0:9a880586b57e
File content as of revision 0:9a880586b57e:
#include "mbed.h" #include "keypad.h" Serial pc(USBTX, USBRX); // Define your own keypad values char Keytable[] = { '1', '2', '3', '4', '5', '6', '7', '8', '9', '*', '0', '#' }; uint32_t cbAfterInput(uint32_t index) { pc.printf("Code\n"); pc.printf("Index:%d => Key:%c\n", index, Keytable[index]); return 0; } int main() { pc.printf("Code\n"); Keypad keypad(p25, p26, p27, p28, p21, p22, p23, p24); keypad.CallAfterInput(&cbAfterInput); keypad.Start(); while (1) { wait_ms(100); } }