FadeLed
A simple Arduino library to fade leds on hardware PWM
|
Example how to use FadeLed with RGB-fading. More...
#include <FadeLed.h>
Functions | |
void | setup () |
void | loop () |
Variables | |
FadeLed | redLed (9) |
FadeLed | greenLed (10) |
FadeLed | blueLed (11) |
unsigned long | millisLast = -1 |
const unsigned long | Interval = 10000 |
Example how to use FadeLed with RGB-fading.
Septillion (https://github.com/sseptillion)
This is an example how to use FadeLed library when fading RGB LEDs so they fade smoothly from one color to another. Here we pick a random new color every 10 seconds and LED the RGB led fade to the new color in 5 seconds.
The RGB LED is connected to pins 9, 10 and 11 for red, green en blue respectively. Don't forget to add a current limiting resistor for each color.
Pin A0 is used to get a random seed and needs to be unconnected.