You are reading a single comment by @AkosLukacs and its replies. Click here to read the full conversation.
  • (edited with some clarification) Just got a strip with "RGBW WS2812B" Leds from banggood. The good news is, the neopixel library it just works! If the number of LEDs is divisible by 3, or you pad it.
    For example (on MDBT42Q module):

    require("neopixel").write(D14, [50,0,0,0, 0,50,0,0, 0,0,50,0, 0,0,0,50, 50,50,50,50, 50,50,50,0]);

    produces green, red, blue, and three "white"s.
    But the library throws an exception if I try to write a single RGBW pixel:

    require("neopixel").write(D14, [50,0,0,0]);

    Tried to dig into the c code, and create a writeRGBW method, initially I thought it's just checking for different length :) But that rabbit hole is a bit deeper with all the device specific drivers...

    @Gordon you have done a great job documenting the build process, had a custom build for the MDBT42Q module in a couple of minutes!

    Do you plan to modify the library for official support? Or just add the workaround to the docs?

  • Thr 2019.02.07

    'Just got a strip with RGBW WS2812B Leds'

    The above needs clarification as WS2812b are Neopixels, while RGBW are most likely SK6812 Neopixel LEDs. Subtle naming convention. Either one or the other, but not RGBW WS2812b Leds   32 vs 24­/WS2812.pdf­les/2757/p2757_SK6812RGBW_REV01.pdf

    'the neopixel library it just works'

    Well yes and no. While the Neopixel library referenced using the require instruction does work as described right out of the box illuminating with color, if and only if, the array referenced is in the correct RGB format. If true Neopixels were what was tested, then the output would have been GRB not RGB.

    'If the number of LEDs is divisible by 3, or you pad it'

    Did you mean the referenced array is three times the size of the equivalent number of Neos in the strip?

    'and create a writeRGBW method'

    What exactly will this function do? Is the intent to individually address each Neo by way of an array offset or something of the sort? 32 bit data variant?


Avatar for AkosLukacs @AkosLukacs started