Controlling WS2812 LEDs with NCS on nRF52832DK with gpios (not SPI)

I have downloaded the WS2812 driver example and have successfully been using the nRF52832 DK to control these lights with SPI. I am ready to start developing on a custom board (still nRF52832). The only issue is that the LEDs are not connected to an SPI MOSI pin.

In the driver documentation, it looks like it is possible to control the LEDs with a normal GPIO pin. However, I am not quite sure what I should do to the board .overlay file or .config file to switch from SPI to GPIO configuration. For now I am just trying to get this to work on the DK, I haven't made the DTS file for my board yet.

All I have tried is using the driver example and replacing the .overlay file contents with this...

 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/led/led.h>
//  #include "../nrf52-bindings.h"
 
 / {
	 led_strip: ws2812 {
		 compatible = "worldsemi,ws2812-gpio";
		 label = "WS2812";
 
		 chain-length = <16>; /* arbitrary */
		 color-mapping = <LED_COLOR_ID_GREEN
					 LED_COLOR_ID_RED
					 LED_COLOR_ID_BLUE>;
		 /*
			 * Arduino D11 / P0.25, which was chosen to match the pin
			 * used in nrf52dk_nrf52832.overlay.
			 */
		 in-gpios = <&gpio0 25 0>;
	 };
 
	 aliases {
		 led-strip = &led_strip;
	 };
 };
 

I found this in the overlay file for a board that uses GPIO. After also removing the references to SPI in the board .conf and prj.conf file I get this error...

undefined reference to `__device_dts_ord_11'

Is it possible to control the LEDs with normal GPIO pins with nRF52832 boards? If so what am I doing wrong? Thanks...

Related