You would still need a way to convert the analogue potentiometer output to a digital RPi input. One way to do this is to count the time it takes to charge up a capacitor through the variable resistance of the potentiometer (this is a relatively slow process, but very inexpensive to implement). As per PiGraham above (and my previous post), you can also "keep it simple" by using an existing A-D conversion HAT.

- 823A02D4-DF46-4C09-911F-FB11D6C3C965.jpeg (184.67 KiB) Viewed 2467 times
The way this works is that you normally have the capacitor discharged by keeping the GPIO output line HIGH. To take a measurement, make the GPIO output line LOW and count how long it takes before the GPIO input goes LOW (normally it will be HIGH). It will be around 2ms when the pot it set to maximum resistance (with the component values shown), decreasing as the pot is wound down to about 0.2ms.
For those interested: the transistor on the right (Q4) provides a discharge path for the capacitor. When it turns off, the capacitor charges through the pot and resistor (the resistor is necessary in case the pot is at zero resistance, which would short out the transistor). Q3 compares the voltage on the capacitor with a reference voltage on the 100 ohm resistor, which comes from Q2 and the potential divider on Q2's base. (Q2 & Q3 are wired in what we call a "long tailed pair", and form the basis of an op amp.) It is done this way so that variations in supply voltage do not alter the time it takes to charge the capacitor.
When the capacitor voltage exceeds the trip point, Q3 turns on and Q2 turns off, which turns off Q1 and makes the GPIO input go LOW.
Q1 is a general-purpose PNP, Q2-4 are general purpose NPN.
The above is a quality circuit, and should provide consistent timings. If you want "cheap and cheerful", it can even be done with one GPIO pin like this:

- B3CED8E9-6AFB-4C8D-9BA6-E59E55CAB4CE.jpeg (58.06 KiB) Viewed 2467 times
To use it: make the GPIO pin an output and drive it LOW. Wait 1ms. Make the GPIO pin an input, and read how long it takes to go from LOW to HIGH.