https://diarmuid.ie/blog/pwm-exponential-led-fading-on-arduino-or-other-platforms/