thinkyhead

M150 - Set RGB(W) Color

lcd Set the color of the RGB(W) LED, backlight, or LED strip. BLINKM|RGB_LED|RGBW_LED|NEOPIXEL_LED|PCA9632

Description

If you have an RGB(W) light, either as part of a controller or installed separately, the M150 command can be used to set its color.

Usage

M150 [B<intensity>] [I<pixel>] [K] [P<intensity>] [R<intensity>] [S<strip>] [U<intensity>] [W<intensity>]

Parameters

[B<intensity>]

Blue component from 0 to 255

    [I<pixel>]
    2.0.6
    NEOPIXEL_LED

    NeoPixel pixel index (0 .. pixels-1)

      [K]
      NEOPIXEL_LED

      Keep all unspecified values unchanged

      [P<intensity>]
      NEOPIXEL_LED

      Brightness from 0 to 255

        [R<intensity>]

        Red component from 0 to 255

          [S<strip>]
          2.0.6.1
          NEOPIXEL2_SEPARATE

          NeoPixel strip index (0 or 1)

            [U<intensity>]

            Green component from 0 to 255

              [W<intensity>]
              RGBW_LED | NEOPIXEL_LED

              White component from 0 to 255

                Examples

                Set LEDs to blue with brightness 30

                M150 B30

                Set NeoPixel 0 to red with brightness 100

                M150 R100 I0

                Set NeoPixel 1 to green with brightness 45

                M150 U45 I1

                Set the second NeoPixel strip full white

                M150 W255 S1

                Change red to 50% without changing other components

                M150 K R127