5.5.D - Potentiometer Pixel Smooth
Learn how to control a micro:bit with a Potentiometer and code.
Next
Same Circuit – Make sure connections still work
We'll need to connect one side of the Potentiometer to Ground (GND) and the other side to 3.3v
We will then connect the center of the Potentiometer to Pin 0. (Note that Pin 0 is an analog pin, which we'll need for the Potentiometer.)
The 3.3v hole on the Bit Board is labeled and is actually two holes right next to each other on the Bit Board. (There is a small line showing the connection between them.)
Back
Next
Load the Code
For this code we've added a variable to track the previous value of the Potentiometer. This allows us to compare it to the current value, and only clear the screen and plot a new pixel if the value has changed.
While our code is a little more complicated, it becomes more efficient, and only executes certain commands based on conditions.
Back
Next
Load the Code
We're going to load the following code for our Potentiometer Pixel Smooth program
Back
Next
Test it Out!
Turn the small blue knob on the Potentiometer and you should see a single pixel move left or right.
This time we plot the pixel (after clearing the screen) only after we check if the value from the Potentiometer has changed from what its previous value was.
Back
Next
Back
5.5.D - Potentiometer Pixel Smooth
Teaching and Learning
Created on May 19, 2026
Start designing with a free template
Discover more than 1500 professional designs like these:
View
Essential Business Proposal
View
Project Roadmap Timeline
View
Step-by-Step Timeline: How to Develop an Idea
View
Artificial Intelligence History Timeline
View
Microlearning: Design Learning Modules
View
Momentum: Onboarding Escape Game
View
Momentum: Manager Guide
Explore all templates
Transcript
5.5.D - Potentiometer Pixel Smooth
Learn how to control a micro:bit with a Potentiometer and code.
Next
Same Circuit – Make sure connections still work
We'll need to connect one side of the Potentiometer to Ground (GND) and the other side to 3.3v
We will then connect the center of the Potentiometer to Pin 0. (Note that Pin 0 is an analog pin, which we'll need for the Potentiometer.)
The 3.3v hole on the Bit Board is labeled and is actually two holes right next to each other on the Bit Board. (There is a small line showing the connection between them.)
Back
Next
Load the Code
For this code we've added a variable to track the previous value of the Potentiometer. This allows us to compare it to the current value, and only clear the screen and plot a new pixel if the value has changed.
While our code is a little more complicated, it becomes more efficient, and only executes certain commands based on conditions.
Back
Next
Load the Code
We're going to load the following code for our Potentiometer Pixel Smooth program
Back
Next
Test it Out!
Turn the small blue knob on the Potentiometer and you should see a single pixel move left or right.
This time we plot the pixel (after clearing the screen) only after we check if the value from the Potentiometer has changed from what its previous value was.
Back
Next
Back