Quick Question on a simple Potentiometer sketch

Your resistance is 10k (10000 ohms) not 1024 ohms. And your voltage is a fraction of Vcc which is around 5V, not 3.3V. Actual Vcc can vary, so if you have a multimeter measure it and use that value in your calculation.

(Also, when posting, the # button wraps your code in code tags which makes it easier for other people to read).

1 Like