Interacting with Buttons

This chapter will introduce you to methods of interacting with the buttons and touchpads that come with the Adafruit Circuit Playground Express. You will learn how to detect whether a button is being pressed and you will also explore more advanced topics, such as fine tuning the sensitivity of capacitive touchpads.

In this chapter, we will cover the following recipes:

  • Detecting push button presses
  • Controlling LEDs with push buttons
  • Reading a slide switch
  • Calling functions on the button state change
  • Moving active LEDs with push buttons
  • Playing a beep on the button press
  • Detecting touch on a touchpad
  • Monitoring the touchpad raw measurements
  • Adjusting the touch threshold

Get MicroPython Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.