Potentiometer

cable

Potentiometer

cable

cable Wire a potentiometer

A three single colour LEDs are connected to the Raspberry Pi Pico using GP5, GP8, and GP13 each also using the nearest GND pins.
The arrow turned all the way to the right points to the 3V3 pin.

play_circle stop_circle
# Import the Potentiometer component
from picozero import Pot
from time import sleep

# Set up Potentiometer pin number
dial = Pot(0) # Connected to pin A0 (GP26)

# Check potentiometer value in a loop
while True:
    print(dial.value) 
    sleep(0.1)


bug_report My Potentiometer doesn't work

  • Check your connections.
  • Check the pin numbers in your code.
  • Check that your code is indented correctly.