Played with a bunch of values, added log-scaling for LED brightness, added auto-tuning for flashing