Can I pull the "Status LED" to the terminals?

I’m looking to place my particle boron in a fancy waterproof case but I’d like to know the connectivity status of it while its out in use. Is there a way to pull the RGB “status” LED out to header pins so I can wire in my own RGB LED ?

You can mirror the RGB status LED to external pins:
https://docs.particle.io/reference/device-os/firmware/boron/#mirrorto-

Fantastic !! Thanks @no1089

Don’t forget the possibility to use light pipes.

2 Likes

What are light pipes?

These are made of transparent plastic (usually Polycarbonate) and work similar to fiber optics to guide light from one place (e.g. your LED) somewhere different (e.g. out of your casing).

When you google the term you’ll find all kinds of examples.

1 Like

Am I missing something?

What device are you using?
Does it feature an A7 pin at all?

Or have a look at the datasheet - how many ADC pins do you see :wink:

BTW, for PWM you don’t need an A# pin but only PWM enabled pins. In the reference docs for analogWrite() (PWM) you will find which these are on your device.

Boron… only goes to A5, haha.
image
Switched it to A1-3 and it works now.

Here’s the finished code under the Void setup()

    int mirrorR = A1;                       // /Mirror Code
    int mirrorG = A2;
    int mirrorB = A3;
    RGB.mirrorTo(A1, A2, A3);
    RGB.mirrorTo(A1, A2, A3, true);
    RGB.mirrorTo(A1, A2, A3, true,true);
    STARTUP(RGB.mirrorTo(A1, A2, A3));      // Mirror Code End

Not sure what you mean with that.
This code has little place inside setup() and there is also no point in calling RGB.mirror() four times.
Also what is the reason in defining your mirrorX variables when you are not using them at all (I’d also make them global and const)
If you don’t know the exact implementation of RGB.mirrorTo() I’d also suggest to explicitly set pinMode() to OUTPUT.

This would be how I’d write it

const int mirrorR = A1;
const int mirrorG = A2;
const int mirrorB = A3;
void startup() {
  pinMode(mirrorR, OUTPUT);
  pinMode(mirrorG, OUTPUT);
  pinMode(mirrorB, OUTPUT);
  RGB.mirrorTo(mirrorR, mirrorG, mirrorB, true, true);
}
STARTUP(startup())

void setup() {
}
2 Likes

For “light pipes”, I’ve successfully used the following material. I drilled a ¼" hole in the case directly above the status LED. I then cut a length of the rod so that it rests just above the status LED and goes through the case (outside) about 1/16". Glue can be used to secure the rod. It’s very inexpensive and works great! In my case, the supplier is grainger.com, but I’m sure there are lots of suppliers. There are also many commercial suppliers of “real” light pipes that are lots more elegant.

1 Like

As a side note… I believe this setup only works with a Common Anode RGB led. Which means the common is hooked into the constant positive (3.3v in my case) as opposed to a Common Cathode where the common is hooked into the ground.

Update: the code supplied above, works with a common Anode RGB. But with some tweeks can be used with a C-Cathode

image

Nope, RGB.mirrorTo() has a parameter to decide between common anode and cathode.

https://docs.particle.io/reference/device-os/firmware/boron/#mirrorto-

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.