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