Skip to content

Commit 5bee957

Browse files
jasondamingclaude
andauthored
Document AddressableLED single object limitation and workarounds (#3136)
* Document AddressableLED single object limitation and workarounds Adds important note that roboRIO can only control one AddressableLED object at a time, with solutions for controlling multiple strips (daisy-chaining, Y-cables) and voltage considerations for WS2812B LEDs. Fixes #2322 * Move voltage consideration note to separate section Per review feedback, the 5V vs 6V voltage concern is a general issue for all AddressableLED usage, not specific to running multiple strips. Moved to a standalone warning after the seealso block. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> --------- Co-authored-by: Claude <[email protected]>
1 parent f7bfc04 commit 5bee957

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

source/docs/software/hardware-apis/misc/addressable-leds.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ LED strips have been commonly used by teams for several years for a variety of r
44

55
.. note:: LEDs can be controlled through this API while the robot is disabled.
66

7+
.. important:: The roboRIO can only control **one** ``AddressableLED`` object at a time through its PWM ports. Attempting to create multiple ``AddressableLED`` objects will result in a HAL allocation error. If you need to control multiple physical LED strips, you have several options:
8+
9+
- **Daisy-chain strips in series**: Connect multiple LED strips end-to-end as a single long strip, then use :ref:`buffer views <docs/software/hardware-apis/misc/addressable-leds:Controlling Sections of an LED Strip>` to control different sections independently
10+
- **Use PWM Y-cables**: If you need identical patterns on multiple strips, use PWM Y-cables to send the same signal to multiple strips simultaneously
11+
12+
.. seealso:: For detailed information about powering and best practices for addressable LEDs, see the [Adafruit NeoPixel Überguide](https://learn.adafruit.com/adafruit-neopixel-uberguide/powering-neopixels).
13+
14+
.. warning:: WS2812B LEDs are designed for 5V, but roboRIO PWM/Servo ports output 6V. While the LEDs will function, this may reduce their lifespan. Consider using a voltage regulator or level shifter if longevity is a concern.
15+
716
## Instantiating the AddressableLED Object
817

918
You first create an ``AddressableLED`` object that takes the PWM port as an argument. It *must* be a PWM header on the roboRIO. Then you set the number of LEDs located on your LED strip, which can be done with the ``setLength()`` function.

0 commit comments

Comments
 (0)