O'Reilly logo

Arduino Workshop by John Boxall

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9. Numeric Keypads

In this chapter you will

  • Learn how to connect numeric keypads to your Arduino

  • Read values from the keypad in a sketch

  • Expand on decision systems with the switch-case function

  • Create a PIN-controlled lock or switch

Using a Numeric Keypad

As your projects become more involved, you might want to accept numeric input from users when your Arduino isn’t connected to a PC—for example, if you’d like to have the ability to turn something on or off by entering a secret number. One option would be to wire up 10 or more push buttons to various digital input pins (for the numbers 0 through 9); but it’s much easier to use a numeric keypad like the one shown in Figure 9-1.

Figure 9-1. Numeric keypad

One of the benefits of using a keypad is ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required