Chapter 5. User Input

In this chapter, you will learn how to let your BeagleBone programs receive user input through external hardware. We will cover the following topics:

  • Buttons
  • Potentiometers

Buttons

A button is one of the simplest input devices you can connect to your BeagleBone. To sense the state of a button, we only need to use a single GPIO pin configured as an input. We haven't used a GPIO input yet, so let's take a look at a simple example first.

For this circuit, you will need:

  • Breadboard
  • 1x tactile switches
  • 1x 10 kΩ resistors
  • Jumper wires

A tactile switch is a type of momentary push button, meaning that it is only engaged while it is held down and returns to its default state when released. They are widely available from stores such as Adafruit ...

Get Learning BeagleBone Python 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.