LEDs always dim with arduino nano
You can't drive LEDs from a source greater than 5V as a low-side switch with an Arduino directly. To do so you need an &quot;open drain&quot; output.
You can create them on the Arduino by adding a single transistor (N-channel MOSFET with &quot;logic level&quot; threshold, or NPN BJT) which the Arduino switches:



simulate this circuit &ndash; Schematic created using CircuitLab
R2 just exists to keep M1 turned off when the Arduino's not actively driving it (i.e., while the bootloader runs, etc).