This project shows how to randomly fade the colors of RGB LEDs, as well as control their speed and brightness with potentiometers. The project also demonstrates how to encapsulate groups of nodes as Functions which can be reused multiple times.

View Comments (0)

Breadboard

The top level control agent simply connects potentiometers to the RGB LED agents through 6 copies of a function called Value Fader, which is responsible for randomly fading one value.

The Value Fader function encapsulates the nodes that fade a single RGB LED channel. It uses a timer with an end behavior of Return to fade a value from 0 to 1 and back again. A Random Number node provides a random duration value for each run of the timer. The random number is multiplied with a “gain” value so the user can also control the speed of the timer.

View Comments (0)