<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>nRF52840 DK updating WS2812B led strip?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/112037/nrf52840-dk-updating-ws2812b-led-strip</link><description>Hi, 
 I have tried the led strip example program and it works. My project will use 88 WS2812B RGB LEDs. For testing I used only 5 WS812B RGB LEDs. If I want to turn on red LED alternate, the code that works is this below. 
 
 
 My concern is if I do it</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 15 Aug 2025 15:46:27 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/112037/nrf52840-dk-updating-ws2812b-led-strip" /><item><title>RE: nRF52840 DK updating WS2812B led strip?</title><link>https://devzone.nordicsemi.com/thread/545815?ContentTypeID=1</link><pubDate>Fri, 15 Aug 2025 15:46:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31e1b7db-d78f-427a-ba49-9c40bac20198</guid><dc:creator>Joonho Jang</dc:creator><description>&lt;p&gt;Hi mtrobregado,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;From the &lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.5.3/page/zephyr/samples/drivers/led_ws2812/README.html"&gt;led_ws2812 sample&lt;/a&gt; I&amp;#39;m trying to use the I2S interface with the nRF52840DK however I&amp;#39;m running into&amp;nbsp;the following build error. Did you run into this error as well by any chance?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/Users/joonhojang/Local_Drive/Workspace/KEYBOARD/Firmware_Modules/nRF52840/led_ws2812/build/led_ws2812/zephyr/include/generated/zephyr/devicetree_generated.h:1337:42: error: &amp;#39;DT_N_S_ws2812_P_chain_length&amp;#39; undeclared here (not in a function); did you mean &amp;#39;DT_N_S_ws2812_P_compatible&amp;#39;?
 1337 | #define DT_N_ALIAS_led_strip             DT_N_S_ws2812&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This is my nrf52840dk_nrf52840.overlay file&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#include &amp;lt;zephyr/dt-bindings/led/led.h&amp;gt;

/* Wiring:
 * - M1.S connected to GND
 * - SDOUT connected to M1.D
 * - ~300 ohm resistor between M1.D and TP5 (5V / Vbus)
 */

&amp;amp;pinctrl {
	i2s0_default_alt: i2s0_default_alt {
		group1 {
			psels = &amp;lt;NRF_PSEL(I2S_SCK_M, 1, 15)&amp;gt;,
			        &amp;lt;NRF_PSEL(I2S_LRCK_M, 1, 12)&amp;gt;,
			        &amp;lt;NRF_PSEL(I2S_SDOUT, 1, 13)&amp;gt;,
			        &amp;lt;NRF_PSEL(I2S_SDIN, 1, 14)&amp;gt;;
		};
	};
};

i2s_led: &amp;amp;i2s0 {
	status = &amp;quot;okay&amp;quot;;
	pinctrl-0 = &amp;lt;&amp;amp;i2s0_default_alt&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;;
};

/ {
	led_strip: ws2812 {
		compatible = &amp;quot;worldsemi,ws2812-i2s&amp;quot;;

		i2s-dev = &amp;lt;&amp;amp;i2s_led&amp;gt;;
		chain-length = &amp;lt;10&amp;gt;; /* arbitrary; change at will */
		color-mapping = &amp;lt;LED_COLOR_ID_GREEN
		LED_COLOR_ID_RED
		LED_COLOR_ID_BLUE&amp;gt;;
		out-active-low;
		reset-delay = &amp;lt;120&amp;gt;;
	};

	aliases {
		led-strip = &amp;amp;led_strip;
	};
};&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 DK updating WS2812B led strip?</title><link>https://devzone.nordicsemi.com/thread/490837?ContentTypeID=1</link><pubDate>Wed, 26 Jun 2024 10:25:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8efd6561-7e1b-4b5a-95f4-fc9a382a7c01</guid><dc:creator>mtrobregado</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The led strip using I2S interface works for nRF52840 DK. I have already solved my problem.&lt;/p&gt;
&lt;p&gt;Markel&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 DK updating WS2812B led strip?</title><link>https://devzone.nordicsemi.com/thread/490101?ContentTypeID=1</link><pubDate>Sun, 23 Jun 2024 03:57:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1a00ba8-434e-4d35-979a-6cb3dd02ecb4</guid><dc:creator>mtrobregado</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Just want to update the issue. Using nrF52850 DK led strip SPI P1.13, the code does not turn on the first WS2812B led. Also, as mentioned you need to turn on the WS2812B one by one and it is not efficient.&lt;/p&gt;
&lt;p&gt;Anyway, I will try I2S and see if it works better.&lt;/p&gt;
&lt;p&gt;Markel&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 DK updating WS2812B led strip?</title><link>https://devzone.nordicsemi.com/thread/489455?ContentTypeID=1</link><pubDate>Wed, 19 Jun 2024 09:21:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:74a04d11-48b7-4e76-89e2-33e67674a987</guid><dc:creator>mtrobregado</dc:creator><description>&lt;p&gt;I just tested this at my 88 WS2812B LEDs project and it does not work properly. I am using SPI MOSI P1.13&lt;/p&gt;
&lt;p&gt;Markel&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 DK updating WS2812B led strip?</title><link>https://devzone.nordicsemi.com/thread/488684?ContentTypeID=1</link><pubDate>Thu, 13 Jun 2024 13:07:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a6ffa27b-a63a-43b1-8637-f175f03d78d7</guid><dc:creator>runsiv</dc:creator><description>&lt;p&gt;Ah sorry my bad. I don&amp;#39;t think there should be any issue as far as I can see.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Runar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 DK updating WS2812B led strip?</title><link>https://devzone.nordicsemi.com/thread/488436?ContentTypeID=1</link><pubDate>Wed, 12 Jun 2024 07:54:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6ce56dab-e3b2-41a0-a50e-72bd43ea2e59</guid><dc:creator>mtrobregado</dc:creator><description>&lt;p&gt;Hi Runar,&lt;/p&gt;
&lt;p&gt;That is what I am using.&lt;/p&gt;
&lt;p&gt;Markel&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 DK updating WS2812B led strip?</title><link>https://devzone.nordicsemi.com/thread/488434?ContentTypeID=1</link><pubDate>Wed, 12 Jun 2024 07:50:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85ccbcd3-f4d8-4db7-95e5-ad4c20f695ea</guid><dc:creator>runsiv</dc:creator><description>&lt;p&gt;Hi Markel&lt;/p&gt;
&lt;p&gt;Personally I would just use the sample you can already find in Zephyr, which you can find &lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.5.3/page/zephyr/samples/drivers/led_ws2812/README.html"&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Runar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>