Chapter 6
Keypads and Keyboards
IN THIS CHAPTER
Considering keypads
Discovering how keypads work
Using the Keypad library for easier keypad programming
Teaching an Arduino how to pretend to be a computer keyboard
This chapter shows you how to use a common input device called a keypad. It also shows you how to use a unique feature of some Arduino boards, including the popular Leonardo, to send information to a computer as if the Arduino were a keyboard.
Using a Keypad
A keypad is a common form of input for devices built with microcontrollers such as the Arduino. You’re probably most familiar with keypads from devices such as calculators and phones — they consist of an array of push buttons arranged in rows and columns. Figure 6-1 shows a typical keypad, with four rows of four push buttons each.
You can purchase keypads such as this one from many different suppliers, including Amazon, Jameco Electronics (www.jameco.com), and others. Just search the web for “Arduino keypad,” and you’ll find a wide variety to choose from. Simple keypads such as the one shown in Figure 6-1 cost just ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access