Cant get LED working (libDaisy)

Probably user error, but cant figure out how to get an led light up
A rgb led is connected with its pins to: - to ground, R to D9, G to D10, B to D11
(currently no resistors inbetween as didnt order any and just wanna try making it work, so even if it’ll burn out, it’d be a success)

At start of file

RgbLed led;

In main() (also tried polarity on false)

led.Init(D9, D10, D11, true);

in for loop in main()


on button press

led.Set(0.5, 0.5, 0.5);

is anything with this wrong/missing?
or do we have a hardware issue?

EDIT: thats the led

That datasheet is for a Common Anode LED. the long leg should go to +3.3v, and the polarity should be set to true in Init.

At least, I THINK that’s it. I can’t test it, because I only have common cathode LEDs here, which work fine for me.

didnt know there exists a common anode version
will try that out when back at the workbench

do we see that right, that we can leave blue and green without a resistor, as their max voltage is 3.6V and only need one for red with its max voltage of 2.4V?

EDIT: whats the difference between 3.3V analog and 3.3V digital?

Im pretty sure you can use either common anode or common cathode, that’s the purpose of the polarity in Init().
For common cathode, the long leg (cathode) goes to ground. For common anode, the long leg (anode) goes to +3.3.
You could test this using an ordinary LED.

1 Like

do you know if there is a difference between 3.3V analog and 3.3V digital?

No difference that should matter to this. On some revisions, the 3.3v analog has its own regulator, not sure if that’s true on all revisions.

EDIT: did you try connecting the anode to +3.3?

thank you :slight_smile:

to the edit: no, havent tried it yet and not around the workbench right now