Unable to set Color

I’m guessing that I am missing something simple but I can’t seem to change the color of a simple ColorFill on a strip of WS2812B. Multiple animations run just fine. It just seems like the color is being ignored and always defaulting to green. Here is a simple YML file that always lights green. What am I missing?

driver:
  typename: pi_ws281x
  gpio: 13
  c_order: RGB
  num: 12
animation:
  typename: $bpa.strip.ColorFill
  color: red

FYI, Rainbow animation runs just fine…

{
    "animation": {
        "typename": "BiblioPixelAnimations.strip.Rainbows.RainbowCycle"
    },
    "run": {
        "fps": 30
    },
    "driver": {
        "typename": "pi_ws281x",
        "gpio": 13,
        "c_order": "RGB",
        "num": 24
    },
    "layout": {
        "typename": "strip",
        "brightness": 192
    }
}

OK, so I went through some of the other posts and noticed that someone mentioned the colors are GRB instead of RGB. Based on that I decided to try specifying green instead of red for [0,255,0]. Low and behold I’ve got red. I’m guessing I have something screwed up in the driver specifications since I specify RGB.

{
    "animation": {
        "typename": "BiblioPixelAnimations.strip.ColorFill",
        "color": "green"
    },
    "run": {
        "fps": 10
    },
    "driver": {
        "typename": "pi_ws281x",
        "gpio": 13,
        "c_order": "RGB",
        "num": 300
    },
    "layout": {
        "typename": "strip",
        "brightness": 192
    }
}

Most WS2812 LEDs are GRB order. Change c_order to GRB and you should be fine. This is totally and 100% normal.

1 Like