Skip to main content
Explorer
November 18, 2022
Solved

Controlling WS2812B LED Strip With STM32

  • November 18, 2022
  • 2 replies
  • 17925 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.

    This topic has been closed for replies.
    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

    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

    salvi.aAuthor
    Explorer
    November 20, 2022

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

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