Try to develop Driver for WS2812B

I used nRF52840 board with SDK 17_1_0 ,

I want to used WS2812B in my project so any one can give me  reference code for this or

can suggest me how can i implement its driver in segger embedded studio.

  • if i used nrf Connect SDK then i want to write hole code from starting right?

    ok i will try with i2s or spi peripheral

    which driver Edvin provide is for PCA10040,so for PCA10056 any driver is available?

    i try to implement code in  PCA10056 using i2s PCA10040  reference code but nrf_drv_i2s_init not match with PCA10056.

  • ChiragBhavsar said:
    if i used nrf Connect SDK then i want to write hole code from starting right?

    Is your project already in development? I recommend the nRF Connect SDK for new project. The code from nRF5 SDK cannot be carried over.

    ChiragBhavsar said:

    ok i will try with i2s or spi peripheral

    which driver Edvin provide is for PCA10040,so for PCA10056 any driver is available?

    i try to implement code in  PCA10056 using i2s PCA10040  reference code but nrf_drv_i2s_init not match with PCA10056.

    The use of the peripheral drivers is mostly the same between PCA10040 and PCA10056. I don't understand what you mean by nrf_drv_i2s_init not matching PCA10056. 

  • for i2s_ws2812b_drive_handler used 3 argument and in PCA10056 nrfx_i2s_data_handler_t used 2 argument.

    rr_code = nrf_drv_i2s_init(&config, i2s_ws2812b_drive_handler);

    void i2s_ws2812b_drive_handler(uint32_t const * p_data_received,
    uint32_t p_data_to_send,
    uint16_t number_of_words
    )

    typedef void (* nrfx_i2s_data_handler_t)(nrfx_i2s_buffers_t const * p_released,
    uint32_t status);

    so for WS2812B PCA10056 driver is available?so i can take it reference and used driver on my exciting project. 

  • It is more likely that the driver you are referencing is implemented for a different version of the SDK, not that it is incompatible with PCA10056.

    You can maybe search the internet for a different driver. Both the nRF52840 and the WS2812B are popular devices. There are more than one driver projects. This is literally the first Google result when I search for "ws2812 nrf52840":  WS2812 nrf52840 example 

    Regardless, you will have to analyze the code, understand what the parameters of the functions are for, and port it for your environment.

  • Than you so much for your support,

    i used WS2812 nrf52840 example for reference and i am able to operate the all three led 

Related