In this chapter, we will use digital inputs to make it possible for users to interact with the board while we process the HTTP requests. We will:
Understand the difference between pull-up and pull-down resistors to connect pushbuttons
Wire digital input pins with pushbuttons
Use polling to check the pushbutton status with the
mraa
andwiring-x86
librariesCombine polling to read digital inputs while running a RESTful API
Write code that maintains consistency when we provide shared features with electronic components and APIs
Use interrupts and the
mraa
library to detect pressed pushbuttonsUnderstand the differences, advantages, and trade-offs between polling and interrupts to detect changes in digital inputs