O'Reilly logo

Internet of Things with Python by Gastón C. Hillar

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 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 ...

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