I'm building a UNO R4 based LED Christmas tree controller that simply adjusts brightness as a pot is twisted. But, the LEDs do not smoothly transition from OFF to full bright. Instead they jump from OFF, to about 1/3 brightness, to full bright - Here's a video showing me turning pot from full OFF to full ON over a 5 sec interval: Video
I'm not sure if I have a circuit problem, coding problem, or what. Here's my schematic:
Remember to choose the correct profile fr the pot m, then also LEDs are non linear. they’ll be brighter at the lower end of drive pwm, than further up rpthe curve, One solution is a lookup array of 255 uints to adjust the curve profile,
In addition to the other errors already cited:
You have 29VDC connected to the Uno A0 via the dimmer pot. Any voltage over 5V will damage the Uno.
You need to supply the pot with 5V if the Uno is still OK
I changed the circuit to use 3.3 V out of the board to the pot, as shown below. Fortunately, I did not appear to have damaged the UNO, or its replacement (Redbear Blend Micro I had sitting around). I'm glad you guys pointed out that major mistake. I need to be more careful.