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 ...
Get Electronics All-in-One For Dummies, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.