Tri-Color LED


Well-known member
Has anyone thought about using a 4-pin RGB LED with the Daisy?

If we figured out how to connect 3 of those pins to the Daisy, send each pin a square wave and control the PWM of each square wave, we could have have and endless spectrum of colors available to us.

I might create a thread on the topic over at the Daisy forum. Just wanted to get your guys input first.
Just checked the Terrarium. The LEDs are connected to Pin 22 and 23. Unfortunately there are only 2 DAC Outs.

Screen Shot 2021-11-04 at 6.16.39 PM.png
Although not quite as simple as driving them by DAC outputs, the Petal uses a PWM driver IC to control the RGB LEDs via I2C.

I believe soft PWM is also an option.
I have had success using RGB LEDs in a custom pcb I had made that is similar to the Terrarium. You could also attach some of the unused Daisy pins in the Terrarium build to the other RGB LED legs.

There is already a RgbLed function in the Daisy stuff, it is pretty easy to use once you point it to the correct pins for the RGB LED. I just used regular non-DAC pins on the Daisy to run these, although I do notice some excess noise. I don't know if the noise is from how I set things up or intrinsic to the software PWM (pulse width modulation).

RgbLed led1;
led1.Init(petal.seed.GetPin(Terrarium::LED_1R), // I define LED_1R as a specific pin in the terrarium.h file, similar to how the pots are defined.
              false); // This last term is true/false for common anode/cathode....but I don't remember which is true and false right now. 
led1.Set(1,0,0); // These 3 numbers are Red, Green & Blue from 0 to 1