user69933: I am just getting back into electronics and have started to play around with making my own button box.
I am trying to control an LED's brightness using a potentiometer, while also reading the potentiometer's value with the Arduino's analogue pin. I want to limit the number of pins I am using for things because I have lots of buttons that will need to be hooked up, so I am trying to control the LED without any code.
I have put together the following circuit (sorry, not my tidiest diagram. I am also using a Pro Micro rather than a Leonardo, but I didn't think that would make any difference :) ).

This works to a degree. I am able to adjust the LED brightness using the pot, and I do get a reading on the Arduino from the pot, however, the reading does not go up linearly as I would expect. It seems to get to about 500 out of 1023 at 4/5 of the rotation and then jumps up to 1023 within the last 1/5.
Could someone explain why this happens, and if it is even possible to do what I am attempting?
Thanks in advance!

user69933: Thanks for all the suggestions.
In the end, I ordered some dual-gang potentiometers as jsotola suggested and Mejenko confirmed would work. These are working perfectly in my circuit now.
Thanks again!

user4143: You need to "buffer" the potentiometer to separate it from the LED and resistor. The simplest circuit for that is a unity-gain voltage follower with an op-amp:

simulate this circuit – Schematic created using CircuitLab
You want to choose a "Rail to Rail I/O" op-amp so that it can get right down to 0V and right up to 5V, otherwise you will clip the top and bottom of the range of the potentiometer.

69933: <p>I am just getting back into electronics and have started to play around with making my own button box.</p>
<p>I am trying to control an LED's brightness using a potentiometer, while also reading the potentiometer's value with the Arduino's analogue pin. I want to limit the number of pins I am using for things because I have lots of buttons that will need to be hooked up, so I am trying to control the LED without any code.</p>
<p>I have put together the following circuit (sorry, not my tidiest diagram. I am also using a Pro Micro rather than a Leonardo, but I didn't think that would make any difference :) ).</p>
<p><a href="https://i.stack.imgur.com/nqC5h.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nqC5h.png" alt="Circuit Diagram" /></a></p>
<p>This works to a degree. I am able to adjust the LED brightness using the pot, and I do get a reading on the Arduino from the pot, however, the reading does not go up linearly as I would expect. It seems to get to about 500 out of 1023 at 4/5 of the rotation and then jumps up to 1023 within the last 1/5.</p>
<p>Could someone explain why this happens, and if it is even possible to do what I am attempting?</p>
<p>Thanks in advance!</p>
 69933: <p>Thanks for all the suggestions.</p>
<p>In the end, I ordered some dual-gang potentiometers as jsotola suggested and Mejenko confirmed would work. These are working perfectly in my circuit now.</p>
<p>Thanks again!</p>
 4143: <p>You need to &quot;buffer&quot; the potentiometer to separate it from the LED and resistor. The simplest circuit for that is a unity-gain voltage follower with an op-amp:</p>

<p><img src="https://i.stack.imgur.com/J4bX7.png" alt="schematic" /></p>

<p><sup><a href="/plugins/schematics?image=http%3a%2f%2fi.stack.imgur.com%2fJ4bX7.png">simulate this circuit</a> &ndash; Schematic created using <a href="https://www.circuitlab.com/" rel="nofollow">CircuitLab</a></sup></p>
<p>You want to choose a &quot;Rail to Rail I/O&quot; op-amp so that it can get right down to 0V and right up to 5V, otherwise you will clip the top and bottom of the range of the potentiometer.</p>
