Skip to content

Commit

Permalink
Docs for M150 S
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Nov 4, 2021
1 parent cec7ef8 commit ead949d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
4 changes: 2 additions & 2 deletions _configuration/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -1979,7 +1979,7 @@ Adds the [`M150`](/docs/gcode/M150.html) command to set the LED (or LED strip) c
LED Strips require a MOFSET Chip between PWM lines and LEDs, as the Arduino cannot handle the current the LEDs will require. Failure to follow this precaution can destroy your Arduino!
{% endalert %}

#### Adafruit Neopixel LED Driver
#### Adafruit NeoPixel LED Driver
```cpp
//#define NEOPIXEL_LED
#if ENABLED(NEOPIXEL_LED)
Expand Down Expand Up @@ -2366,7 +2366,7 @@ This feature allows you to digitally multiplex the fan output. The multiplexer i
//#define CASE_LIGHT_MAX_PWM 128 // Limit pwm
//#define CASE_LIGHT_MENU // Add Case Light options to the LCD menu
//#define CASE_LIGHT_NO_BRIGHTNESS // Disable brightness control. Enable for non-PWM lighting.
//#define CASE_LIGHT_USE_NEOPIXEL // Use Neopixel LED as case light, requires NEOPIXEL_LED.
//#define CASE_LIGHT_USE_NEOPIXEL // Use NeoPixel LED as case light, requires NEOPIXEL_LED.
#if ENABLED(CASE_LIGHT_USE_NEOPIXEL)
#define CASE_LIGHT_NEOPIXEL_COLOR { 255, 255, 255, 255 } // { Red, Green, Blue, White }
#endif
Expand Down
25 changes: 20 additions & 5 deletions _gcode/M150.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ parameters:
-
tag: P
optional: true
requires: NEOPIXEL_LED
description: Brightness from 0 to 255 (Requires `NEOPIXEL_LED`)
values:
-
Expand All @@ -56,22 +57,36 @@ parameters:
tag: I
since: 2.0.6
optional: true
description: Index from 0 to n (Requires `NEOPIXEL_LED`)
requires: NEOPIXEL_LED
description: NeoPixel pixel index (0 .. pixels-1) (Requires `NEOPIXEL_LED`)
values:
-
tag: index
tag: pixel
type: int
-
tag: S
since: 2.0.6.1
optional: true
requires: NEOPIXEL2_SEPARATE
description: NeoPixel strip index (0 or 1) (Requires `NEOPIXEL2_SEPARATE`)
values:
-
tag: strip
type: int

examples:
-
pre: Set Leds to blue brightness 30
pre: Set LEDs to blue with brightness 30

This comment has been minimized.

Copy link
@sblaisot

sblaisot Nov 5, 2021

maybe add a precision here that it will set led to blue on all neopixel strips

code: M150 B30
-
pre: Set Neopixel 0 to red brightness 100
pre: Set NeoPixel 0 to red with brightness 100

This comment has been minimized.

Copy link
@sblaisot

sblaisot Nov 5, 2021

maybe add a precision here that it will set led 0 to red on all neopixel strips

code: M150 R100 I0
-
pre: Set Neopixel 1 to green brightness 45
pre: Set NeoPixel 1 to green with brightness 45

This comment has been minimized.

Copy link
@sblaisot

sblaisot Nov 5, 2021

maybe add a precision here that it will set led 1 to green on all neopixel strips

code: M150 U45 I1
-
pre: Set the second NeoPixel strip full white
code: M150 W255 S1

---

Expand Down
2 changes: 1 addition & 1 deletion _gcode/M256.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ since: 2.0.9.2

codes: [ M256 ]

notes: Requires an LCD controller with software-controlled brightness. This may be extended in the future to work with a Neopixel or RGB LED backlight.
notes: Requires an LCD controller with software-controlled brightness. This may be extended in the future to work with a NeoPixel or RGB LED backlight.

parameters:
-
Expand Down

0 comments on commit ead949d

Please sign in to comment.