Keypad 4x3
A quick and dirty interface to a cheap and cheerful 4x3 Numeric keypad :
Library
Import Library:
http://mbed.org/projects/cookbook/svn/Keypad4x3/trunk
Import Example program:
http://mbed.org/projects/cookbook/svn/Keypad4x3/examples/Keypad4x3
- For details on how to use this in the compiler, see Importing Projects and Libraries in to the Compiler
Hello World
#include "mbed.h" #include "Keypad4x3.h" Keypad4x3 pad (p25,p27,p23,p26,p21,p22,p24); Serial pc (USBTX,USBRX); /* 27 C2 - Left 26 R1 25 C1 24 R4 23 C3 22 R3 21 R2 - Right */ int main(){ while(1){ int i = pad.read(); if (i<0xf){ pc.printf("%d \n",i); } } } |
| Source Code of Keypad4x3.bin (LPC1768 LPC2368). |
