Skip to main content
salvi.a
Associate II
November 18, 2022
Solved

Controlling WS2812B LED Strip With STM32

  • November 18, 2022
  • 2 replies
  • 17982 views

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.

Best answer by Peter BENSCH

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

2 replies

Peter BENSCH
Peter BENSCHBest answer
ST Technical Moderator
November 18, 2022

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.
salvi.a
salvi.aAuthor
Associate II
November 20, 2022

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

Piranha
Principal III
November 18, 2022

> 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?