With this Python program and a Raspberry Pi you could build a LED dimmer. On the electronic side you need a L298N H-Bridge and a PCA9685 controller.
To control the L298N H-Bridge and the PCA9685 controller please use the Python program "L298NHBridgePCA9685.py" from this repository https://github.com/custom-build-robots/Motor-Driver-L298N-and-PCA9685.