Chapter 5. Working with Digital Inputs, Polling and Interrupts

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 and wiring-x86 libraries
  • Combine 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 pushbuttons
  • Understand the differences, advantages, and trade-offs between polling and interrupts to detect changes ...

Get Internet of Things with Python 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.