FadeLed
A simple Arduino library to fade leds on hardware PWM
FadeNotGammaCorrect.ino File Reference

Example to show the difference between fading with and without gamma correction. More...

#include <FadeLed.h>

Functions

void setup ()
 
void loop ()
 

Variables

FadeLed leds [2] = {5, 6}
 

Detailed Description

Example to show the difference between fading with and without gamma correction.

Septillion (https://github.com/sseptillion)

Date
2016-1-30

This is an example to show the difference between fading with gamma correction (default) and fading without. With gamma correction will give you a more natural fading.

By default a 101 step (0 to 100 for full brightness aka percentage) with a gamma 2,3 is used. If no gamma correction is used the range is the full PWM range. For 8-bit (Arduino Uno, Nano, Pro Mini, Mega etc) that gives a range of 0 to 255.

pin 5 Will fade up and down with gamma correction (default) in 5 seconds

pin 6 Will fade up and down together with pin 5 but does it without gamma correction.