Closed terentz closed 4 years ago
It wasn't properly mentioned but the delay of the LED is what effects the brightness. Any "dimmed LED" is actually turning on/off at a fast rate, that our eyes can pick up as a "dimmed" light.
more explanation here: https://www.wikiwand.com/en/Pulse-width_modulation#/Soft-blinking_LED_indicator
I've corrected / commended the code to have it make a bit more sense in https://github.com/Jaycar-Electronics/Arduino-Starter-Kit/commit/bd52bf5e3611a1a85278165d5bb7a8a9ca5ff19a
Cheers
Your comments in the code for the second project indicate that the potentiometer is intended to affect the delay, though the whole point is to adjust the brightness, no?