-
Notifications
You must be signed in to change notification settings - Fork 0
Tri color LED.ino
Arnd edited this page Jan 31, 2021
·
1 revision
This is a simple sketch to demonstrate using a typical 3-color LED with the library. These LEDs have 4 pins - one for each color (Red, Green and Blue) and a common cathode. This means that the library needs to be initialized with INVERT_ON for the 3 LEDs.
The library demonstrates simple color changing - it starts off with all 3 colors set to 1/2 PWM and successively fades 2 of the colors while brightening the third, doing each color in order.
The program has lengthy "delay()" calls, but normally it would continue processing while the library takes care of the fading and PWM in the background.