Why does RoboRio only support 1 AddressableLED object?

From Addressable LEDs — FIRST Robotics Competition documentation

The roboRIO only supports only 1 AddressableLED object. As WS2812B LEDs are connected in series, you can drive several strips connected in series from from AddressableLED object.

I’m just wondering why it only supports one?

The current code on the FPGA only supports 1 AddressableLED object. It could be updated in the future, but its a fairly large change, and controlled by NI.

Would it be possible to simulate multiple AddressableLED objects by doing something like the following in the periodic function of a subsystem?

void periodic() {
// create AddressableLED at port 9
// set the colors
// call the close method on the object
// create AdressableLED at port 8
// set the colors
// close
}

I imagine performance might not be good because you’d need to call setLength twice in each call to periodic and the docs say that setLength is expensive and shouldn’t be called in periodic, but I’m just curious if something like that would even theoretically work. I can always try it on the robot next time I get a chance and see what happens.

It would be much easier and safer to just daisy chain the two strands (so you have one really long logical strand). You can have a pretty long run of signal+ground connecting between the two strands.

4 Likes

We were actually working on the same thing today. Currently we’re wiring all the power/ground to a voltage regulator and a single signal wire to a pwm port on the rio. Is this the correct way to go about doing this?

So, this actually probably won’t work. The FPGA continuously sends the data you last sent. This means that when you close the object, it can stop sending at any time during the send, which will leave you with a partially written strand, and the rest will potentially be garbage.

1 Like

It will probably work if it’s a short run, but ideally you’d run a second ground wire to the Rio ground pin alongside the signal wire to the Rio. It’s all the same ground eventually, but running ground along the same path as signal provides a parallel return path for the signal current and improves the signal integrity.

Oh awesome! It’s our first time doing something like this, and nobody on our team knows a lot of electrical stuff, so this is super helpful!

Alternatively teams can use something like a CANdle or Blinkin

1 Like

We’ve been just using the REV Servo Power Module (Servo Power Module - REV Robotics). Since it passes the signal wire as-is without any changes so wiring wise, it’s a clean wiring run.

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