Micro:bit Physical computing guides
No. 11: Potentiometers
Connecting a Potentiometer to a micro:bit
Instructions on how to attach a potentiometer to a BBC micro:bit.
What you will need
Instructions on how to attach a potentiometer to a BBC micro:bit.
What you will need
- BBC micro:bit
- Micro USB cable
- Battery pack with 2 x AAA batteries
- 1 x potentiometer
- 3 x Crocodile clip leads
Understanding potentiometers
A potentiometer is a special type of resistor. By rotating the knob of the potentiometer you can vary the amount of resistance (see image below).
A potentiometer is a special type of resistor. By rotating the knob of the potentiometer you can vary the amount of resistance (see image below).
Potentiometer
Wiring instructions
- Disconnect the micro:bit from your computer and disconnect the battery pack.
- Using crocodile clips, connect the left leg of the potentiometer (Vcc) to 3V, the middle leg to Pin 0, and the right leg to GND on the BBC micro:bit.
Programming your Potentiometer
Copy the below:
Programming your Potentiometer
Copy the below:
Testing your code
Projects
Testing your code
- Download your program to your micro:bit.
- Reconnect your battery and run your program.
- Turn the knob of the potentiometer to change the value displayed on the micro:bit
Projects
- Change the colour of an RGB LED
- Control the tone or pitch of a buzzer
- Control the scolling speed of the micto:bit display
Frequently Asked Questions
FAQ: Using a Potentiometer with the Micro:bit
Q1: What is a potentiometer?
Q2: How do I connect a potentiometer to the micro:bit?
Q3: What can I control with a potentiometer on the micro:bit?
Q4: What are the steps to set up the potentiometer?
Q1: What is a potentiometer?
- A1: A potentiometer is a type of resistor that allows you to vary the resistance by turning its knob.
Q2: How do I connect a potentiometer to the micro:bit?
- A2: Connect the left leg (Vcc) to 3V, the middle leg to Pin 0, and the right leg to GND on the micro:bit using crocodile clips.
Q3: What can I control with a potentiometer on the micro:bit?
- A3: You can control various outputs like the scrolling speed of the micro:bit display or the brightness of an LED.
Q4: What are the steps to set up the potentiometer?
- A4: Disconnect the micro:bit from your computer, connect the potentiometer as described, and then use the micro:bit to read the resistance changes.