تو لینک زیر با مثال توضیح داده شده .
Arduino Tutorials – Chapter 42 – Numeric Keypads