O'Reilly logo

Learning BeagleBone Python Programming by Alexander Hiam

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

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