From the course: Learning CircuitPython with Circuit Playground Express
Unlock the full course today
Join today to access over 24,200 courses taught by industry experts.
Responding to touch - Python Tutorial
From the course: Learning CircuitPython with Circuit Playground Express
Responding to touch
- [Instructor] In this video, we'll take a look at using the capacitive touch pads on the Circuit Playground Express. Capacitive touch senses when a pad is touched and is available on most CircuitPython boards. The touch pads on the Circuit Playground Express are on the outside. All but one of the input pads, A0, are touch enabled. That leaves seven touch pads. You can touch the pads directly, or you can connect a pad to something conductive, like some foil or a piece of fruit, and use that as your touch pad. Using the touch pads is similar to using buttons and switches. You can set them up manually by importing the board and touchio modules, or like other components on the Circuit Playground Express, you can use the CPX module, when application of touch pads is to use them as triggers, for example to play tones. The algorithm for this type of application is simple. Continuously loop, checking if a pad is touched.…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.