From 10e9889c1e257e7ddef0760774b6adc47a8f0bb9 Mon Sep 17 00:00:00 2001 From: jasondaming Date: Wed, 8 Oct 2025 16:40:25 -0500 Subject: [PATCH 1/2] 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 --- .../docs/software/hardware-apis/misc/addressable-leds.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/docs/software/hardware-apis/misc/addressable-leds.rst b/source/docs/software/hardware-apis/misc/addressable-leds.rst index c0c3a0d4d3..7759ddc1dd 100644 --- a/source/docs/software/hardware-apis/misc/addressable-leds.rst +++ b/source/docs/software/hardware-apis/misc/addressable-leds.rst @@ -4,6 +4,14 @@ LED strips have been commonly used by teams for several years for a variety of r .. note:: LEDs can be controlled through this API while the robot is disabled. +.. 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: + + - **Daisy-chain strips in series**: Connect multiple LED strips end-to-end as a single long strip, then use :ref:`buffer views ` to control different sections independently + - **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 + - **Voltage considerations**: 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. + +.. 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). + ## Instantiating the AddressableLED Object 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. From a1a50e69d55ccf6de3116266247c36ecf7d73df0 Mon Sep 17 00:00:00 2001 From: jasondaming Date: Mon, 13 Oct 2025 20:11:00 -0500 Subject: [PATCH 2/2] Move voltage consideration note to separate section MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- source/docs/software/hardware-apis/misc/addressable-leds.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/docs/software/hardware-apis/misc/addressable-leds.rst b/source/docs/software/hardware-apis/misc/addressable-leds.rst index 7759ddc1dd..0da1f39fb3 100644 --- a/source/docs/software/hardware-apis/misc/addressable-leds.rst +++ b/source/docs/software/hardware-apis/misc/addressable-leds.rst @@ -8,10 +8,11 @@ LED strips have been commonly used by teams for several years for a variety of r - **Daisy-chain strips in series**: Connect multiple LED strips end-to-end as a single long strip, then use :ref:`buffer views ` to control different sections independently - **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 - - **Voltage considerations**: 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. .. 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). +.. 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. + ## Instantiating the AddressableLED Object 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.