Add RGB indicator light

boron
Tags: #<Tag:0x00007fe2266736e8>

#1

I would like to add an RGB led to my enclosure so I can see the status of my Boron without opening the enclosure. I tried searching but didn’t see anything listed. Any help would be greatly appreciated.


#2

Hmm, where could such information be hidden … my guess would be the reference docs.
See top right on this screen

There you could search for RGB

Which would bring you to the RGB object reference

And there RGB.mirrorTo() and RGB.onChange() might be the two functions you are looking for.


#3

Thanks. I guess when it showed over 100 references to RGB and they were mainly talking about status of the blinking, I just assumed they were all the same. Thanks, am looking at it now. Thanks for the lesson


#4

To mirror status with an external led, follow this thread.


#5

Thanks I’ll take a read through it.


#6

Ok so I am reading the documentation and it lists this code for the Boron.

// SYNTAX
// Common-cathode RGB LED connected to A4 (R), A5 (G), A7 (B)
RGB.mirrorTo(A4, A5, A7);
// Common-anode RGB LED connected to A4 (R), A5 (G), A7 (B)
RGB.mirrorTo(A4, A5, A7, true);
// Common-anode RGB LED connected to A4 (R), A5 (G), A7 (B)
// Mirroring is enabled in firmware _and_ bootloader
RGB.mirrorTo(A4, A5, A7, true, true);
// Enable RGB LED mirroring as soon as Boron starts up
STARTUP(RGB.mirrorTo(A4, A5, A7));

It says to using A4, A5, and A7…problem is there is no A7 on the Boron, unless I am just not finding it. I moved the pins to A1,A2,and A3 and it works.