cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling WS2812B LED Strip With STM32

salvi.a
Associate II

Hello,

I'm new to STM32 and trying to learn exciting stuff. I want to light a single LED from my WS2812B strip.

For example I will choose 6th LED on my computer and 6th LED on strip will light up.

But I'm not sure where to start. How can I access to single LED address? And how to get it work with STM32?

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Peter BENSCH
ST Employee

Welcome, @Sadık Özel​, to the community!

The topic of WS2812 has already been discussed here a few times. The thread How to use HAL DMA to generate PWM on P-NUCLEO-WB, for example, also deals with it and refers to a Github driver from Tilen Majerle and an HAL example from Martin Willner.

Maybe that will help you?

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

6 REPLIES 6
Peter BENSCH
ST Employee

Welcome, @Sadık Özel​, to the community!

The topic of WS2812 has already been discussed here a few times. The thread How to use HAL DMA to generate PWM on P-NUCLEO-WB, for example, also deals with it and refers to a Github driver from Tilen Majerle and an HAL example from Martin Willner.

Maybe that will help you?

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Piranha
Chief II

> But I'm not sure where to start. How can I access to single LED address?

Of course, the idea of reading the LED's datasheet does not seem obvious?

After several tries I managed to get it work by PWM and DMA. Thanks a lot.

Thank your for the response to this post. I have successfully used your code to driver the WB2812.

Regards

Jorgie

What STM32 processor are you using ?