Can I control LED brightness with potentiometer without any code, as well as reading the potentiometer value?
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:



simulate this circuit &ndash; Schematic created using CircuitLab
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.