Chapter 6. Digital Input

If you want to build a standalone AVR device, there’s no substitute for the tried-and-true pushbutton. Look around the room you’re now in. How many electronic devices with pushbuttons are you surrounded by? (Feel free to stop counting after five or ten.) Pushbuttons are cheap, ubiquitous, and the natural choice for quick and mostly painless human/AVR interaction.

In this chapter, we’ll take the humble pushbutton as a stand-in for all types of digital input, but there are also a few quirks in using pushbuttons that you will need to know about. Most importantly, they often bounce very rapidly between the on and off states when pressed or released. Additionally, you’re often interested in running ...

Get Make: AVR Programming 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.