A potentiometer.
Let’s look at the voltage divider.
In the previous circuit, we used an LDR and a fixed resistor.
A light-adjusted resistance on one side.
A static resistance on the other.
A0 connected directly to 5V reads about 5V.
A0 connected directly to GND reads about 0V.
We always measure in the MIDDLE of the circuit.
What if instead of one divider,
we create 5 or 10 dividers.
10 sets of same-value resistors?
What do we get?
A measuring point between two equal restrictions:
half of 5V — about 2.5V.
The resistor ratio sets the voltage at that point.
With two fixed resistors, that voltage is fixed.
How could we adjust the ratio ourselves?
Move the measuring point.