jgillick/arduino-LEDFader — pull request #1 by cinderblock (2013-10-22 09:07:40+00:00)
Title: Lookup Table and Exponential Growth

Here's some sample code to add some sort of basic support for the curves I was talking about, and how I might implement it in this.

Also implemented is the exponential function needed for what I'd argue to be a more "natural" dimming.

It would be fun to also add a table that does acceleration and deceleration at the start and end respectively. You could even do it in a manner where you "stack" curves. I'm even starting to imagine other implementations where a Curve is an extendable class and it could get crazy complicated fun.