FadeLed
A simple Arduino library to fade leds on hardware PWM
|
Example how to use FadeLed library with custom gamma table. More...
#include <FadeLed.h>
Functions | |
void | setup () |
void | loop () |
bool | allOff () |
Variables | |
const flvar_t SineTable [91] | PROGMEM |
FadeLed | sines [3] = {{9, SineTable, 90}, {10, SineTable, 90}, {11, SineTable, 90}} |
const byte | NrSines = sizeof(sines)/sizeof(sines[0]) |
Example how to use FadeLed library with custom gamma table.
Septillion (https://github.com/sseptillion)
This is an example how to use FadeLed library with custom gamma table. In this example it even uses a sinusoidal table. You're completely free how the graph should look like, simply define a value for each step.
The sine table is made with the included Python script 'makeSineTable.py' in the folder of this example. Running that will give 91 values (0 to 90 degree) to form a sine.
The pastern that is followed by pins 9, 10 and 11 is shown in 'sines.png'
const flvar_t SineTable [91] PROGMEM |