From the course: Learning CircuitPython with Circuit Playground Express
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Using a potentiometer - Python Tutorial
From the course: Learning CircuitPython with Circuit Playground Express
Using a potentiometer
- [Instructor] In this video, we'll connect a variable resistor or potentiometer to our Circuit Playground Express. A potentiometer is an analog device. The outside terminals of the potentiometer are connected to a voltage and ground. As you turn the potentiometer shaft, the center terminal varies between zero and the connected voltage. In this case, 0 and 3.3 volts. When the center terminal of the potentiometer is connected to a microcontroller pin, the voltage on the pin is 0 to 3.3 volts, but the ADC or analog to digital converter converts the voltage to a value between 0 and 65,535. You can use this value as input to a CircuitPython program. To connect a potentiometer to the Circuit Playground Express, first make sure the USB cable is disconnected. Then attach the two outside terminals to the 3.3 volt and ground pads using alligator clips. Make sure not to use the V out pad. Its voltage may be five volts, which…
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.