stealthburner_leds.cfg modified - 07.09.2026 - 20:36:25
This commit is contained in:
1 parent
6911780201
commit
8557ef249d
1 file changed
+27
-113
@@ -1,101 +1,18 @@
|
||||
# Macros for setting the status leds on the Voron StealthBurner toolhead (or for any neopixel-type leds).
|
||||
#
|
||||
# You will need to configure a neopixel (or other addressable led, such as dotstar). See
|
||||
# https://www.klipper3d.org/Config_Reference.html#neopixel for configuration details.
|
||||
|
||||
|
||||
#####################################
|
||||
# INSTRUCTIONS #
|
||||
#####################################
|
||||
# How to use all this stuff:
|
||||
#
|
||||
# 1. Copy this .cfg file into your Klipper config directory and then add [include stealthburner_leds.cfg]
|
||||
# to the top of your printer.cfg in order to register the LEDs and macros with Klipper.
|
||||
# 2. Define your LEDs by editing [neopixel sb_leds] below and entering the data pin from your control board
|
||||
# as well as the color order.
|
||||
#
|
||||
# Note: RGB and RGBW are different and must be defined explicitly. RGB and RGBW are also not able to
|
||||
# be mix-and-matched in the same chain. A separate data line would be needed for proper functioning.
|
||||
#
|
||||
# RGBW LEDs will have a visible yellow-ish phosphor section to the chip. If your LEDs do not have
|
||||
# this yellow portion, you have RGB LEDs.
|
||||
#
|
||||
# 3. Save your config and restart Klipper.
|
||||
#
|
||||
# Note: We set RED and BLUE to 1.0 to make it easier for users and supporters to detect
|
||||
# misconfigurations or miswiring. The default color format is for Neopixels with a dedicated
|
||||
# white LED. On startup, all three SB LEDs should light up.
|
||||
#
|
||||
# If you get random colors across your LEDs, change the color_order to GRB and restart. Then
|
||||
# omit the W for each suggested color_order in the next paragraph.
|
||||
#
|
||||
# If you get MAGENTA, your color order is correct. If you get CYAN, you need to use RGBW. If
|
||||
# you get YELLOW, you need to use BRGW (note that BRG is only supported in the latest Klipper
|
||||
# version).
|
||||
#
|
||||
# 4. Once you have confirmed that the LEDs are set up correctly, you must now decide where you want
|
||||
# these macros called up...which means adding them to your existing gcode macros. NOTHING will happen
|
||||
# unless you add the STATUS_????? macros to your existing gcode macros.
|
||||
#
|
||||
# Example: add STATUS_LEVELING to the beginning of your QGL gcode macro, and then add STATUS_READY
|
||||
# to the end of it to set the logo LED and nozzle LEDs back to the `ready` state.
|
||||
#
|
||||
# Example: add STATUS_CLEANING to the beginning of your nozzle-cleaning macro, and then STATUS_READY
|
||||
# to the end of it to return the LEDs back to `ready` state.
|
||||
#
|
||||
# 5. Feel free to change colors of each macro, create new ones if you have a need to. The macros provided below
|
||||
# are just an example of what is possible. If you want to try some more complex animations, you will most
|
||||
# likely have to use WLED with Moonraker and a small micro-controller
|
||||
#
|
||||
#####################################
|
||||
# END INSTRUCTRUCTIONS #
|
||||
#####################################
|
||||
# WS2812B lighting and Stealthburner status macros for this printer.
|
||||
# Addressable pixels are RGB/GRB only; there is no dedicated white channel.
|
||||
|
||||
# Separate non-addressable white chamber lamp.
|
||||
[led my_led]
|
||||
|
||||
white_pin: PB10
|
||||
# The pin controlling the given LED color. At least one of the above
|
||||
# parameters must be provided.
|
||||
cycle_time: 0.010
|
||||
# The amount of time (in seconds) per PWM cycle. It is recommended
|
||||
# this be 10 milliseconds or greater when using software based PWM.
|
||||
# The default is 0.010 seconds.
|
||||
#hardware_pwm: False
|
||||
# Enable this to use hardware PWM instead of software PWM. When
|
||||
# using hardware PWM the actual cycle time is constrained by the
|
||||
# implementation and may be significantly different than the
|
||||
# requested cycle_time. The default is False.
|
||||
#initial_RED: 0.0
|
||||
#initial_GREEN: 0.0
|
||||
#initial_BLUE: 0.0
|
||||
initial_WHITE: 1.0
|
||||
# Sets the initial LED color. Each value should be between 0.0 and
|
||||
# 1.0. The default for each color is 0.
|
||||
|
||||
[neopixel leds_light]
|
||||
pin: PB0
|
||||
# The pin connected to the neopixel. This parameter must be provided.
|
||||
chain_count: 55
|
||||
# The number of Neopixel chips that are "daisy chained" to the
|
||||
# provided pin. The default is 1 (which indicates only a single
|
||||
# Neopixel is connected to the pin).
|
||||
color_order: GRB
|
||||
# Set the pixel order required by the LED hardware. Options are GRB,
|
||||
# RGB, GRBW, or RGBW. The default is GRB.
|
||||
initial_RED: 1.0
|
||||
initial_GREEN: 1.0
|
||||
initial_BLUE: 1.0
|
||||
initial_WHITE: 0.0
|
||||
# Sets the initial LED color of the Neopixel. Each value should be
|
||||
# between 0.0 and 1.0. The WHITE option is only available on RGBW
|
||||
# LEDs. The default for each color is 0.#
|
||||
|
||||
# Most configuration for the macros can be done by modifying the variables in the _sb_vars macro
|
||||
# at the start of this file.
|
||||
# One physical WS2812B chain: indexes 1-6 are on the toolhead and 7-49 are
|
||||
# chamber lighting. Only index 1 responded during the 2026-09-07 diagnostic;
|
||||
# inspect the DOUT-1 to DIN-2 connection or pixel 2 before replacing the chain.
|
||||
[neopixel sb_leds]
|
||||
pin: EBBCan:PD3
|
||||
chain_count: 49
|
||||
# This installation uses ordinary three-channel RGB pixels (no white channel).
|
||||
color_order: GRB
|
||||
|
||||
|
||||
@@ -130,26 +47,26 @@ color_order: GRB
|
||||
# configurations for the logo and nozzle here.
|
||||
variable_colors: {
|
||||
'logo': { # Colors for logo states
|
||||
'busy': {'r': 0.4, 'g': 0.0, 'b': 0.0, 'w': 0.0},
|
||||
'cleaning': {'r': 0.0, 'g': 0.02, 'b': 0.5, 'w': 0.0},
|
||||
'calibrating_z': {'r': 0.8, 'g': 0., 'b': 0.35, 'w': 0.0},
|
||||
'heating': {'r': 0.3, 'g': 0.18, 'b': 0.0, 'w': 0.0},
|
||||
'homing': {'r': 0.0, 'g': 0.6, 'b': 0.2, 'w': 0.0},
|
||||
'leveling': {'r': 0.5, 'g': 0.1, 'b': 0.4, 'w': 0.0},
|
||||
'meshing': {'r': 0.2, 'g': 1.0, 'b': 0.0, 'w': 0.0},
|
||||
'off': {'r': 0.0, 'g': 0.0, 'b': 0.0, 'w': 0.0},
|
||||
'printing': {'r': 1.0, 'g': 0.0, 'b': 0.0, 'w': 0.0},
|
||||
'standby': {'r': 0.08, 'g': 0.08, 'b': 0.08, 'w': 0.0},
|
||||
'busy': {'r': 0.4, 'g': 0.0, 'b': 0.0},
|
||||
'cleaning': {'r': 0.0, 'g': 0.02, 'b': 0.5},
|
||||
'calibrating_z': {'r': 0.8, 'g': 0.0, 'b': 0.35},
|
||||
'heating': {'r': 0.3, 'g': 0.18, 'b': 0.0},
|
||||
'homing': {'r': 0.0, 'g': 0.6, 'b': 0.2},
|
||||
'leveling': {'r': 0.5, 'g': 0.1, 'b': 0.4},
|
||||
'meshing': {'r': 0.2, 'g': 1.0, 'b': 0.0},
|
||||
'off': {'r': 0.0, 'g': 0.0, 'b': 0.0},
|
||||
'printing': {'r': 1.0, 'g': 0.0, 'b': 0.0},
|
||||
'standby': {'r': 0.08, 'g': 0.08, 'b': 0.08},
|
||||
},
|
||||
'nozzle': { # Colors for nozzle states
|
||||
'heating': {'r': 0.8, 'g': 0.35, 'b': 0.0, 'w':0.0},
|
||||
'off': {'r': 0.0, 'g': 0.0, 'b': 0.0, 'w': 0.0},
|
||||
'on': {'r': 0.8, 'g': 0.8, 'b': 0.8, 'w':1.0},
|
||||
'standby': {'r': 0.6, 'g': 0.0, 'b': 0.0, 'w':0.0},
|
||||
'heating': {'r': 0.8, 'g': 0.35, 'b': 0.0},
|
||||
'off': {'r': 0.0, 'g': 0.0, 'b': 0.0},
|
||||
'on': {'r': 0.8, 'g': 0.8, 'b': 0.8},
|
||||
'standby': {'r': 0.6, 'g': 0.0, 'b': 0.0},
|
||||
},
|
||||
'thermal': {
|
||||
'hot': {'r': 1.0, 'g': 0.0, 'b': 0.0, 'w': 0.0},
|
||||
'cold': {'r': 0.3, 'g': 0.0, 'b': 0.3, 'w': 0.0}
|
||||
'hot': {'r': 1.0, 'g': 0.0, 'b': 0.0},
|
||||
'cold': {'r': 0.3, 'g': 0.0, 'b': 0.3}
|
||||
}
|
||||
}
|
||||
variable_logo_led_name: "sb_leds"
|
||||
@@ -170,14 +87,13 @@ gcode:
|
||||
{% set red = params.RED|default(0)|float %}
|
||||
{% set green = params.GREEN|default(0)|float %}
|
||||
{% set blue = params.BLUE|default(0)|float %}
|
||||
{% set white = params.WHITE|default(0)|float %}
|
||||
{% set led = params.LED|string %}
|
||||
{% set idx = (params.IDX|string).split(',') %}
|
||||
{% set transmit_last = params.TRANSMIT|default(1) %}
|
||||
|
||||
{% for led_index in idx %}
|
||||
{% set transmit=transmit_last if loop.last else 0 %}
|
||||
set_led led={led} red={red} green={green} blue={blue} white={white} index={led_index} transmit={transmit}
|
||||
SET_LED LED={led} RED={red} GREEN={green} BLUE={blue} INDEX={led_index} TRANSMIT={transmit}
|
||||
{% endfor %}
|
||||
|
||||
[gcode_macro _set_sb_leds_by_name]
|
||||
@@ -189,36 +105,34 @@ gcode:
|
||||
{% set idx = printer["gcode_macro _sb_vars"][leds_name + "_idx"] %}
|
||||
{% set transmit = params.TRANSMIT|default(1) %}
|
||||
|
||||
_set_sb_leds led={led} red={color.r} green={color.g} blue={color.b} white={color.w} idx="{idx}" transmit={transmit}
|
||||
_set_sb_leds LED={led} RED={color.r} GREEN={color.g} BLUE={color.b} IDX="{idx}" TRANSMIT={transmit}
|
||||
|
||||
[gcode_macro _set_logo_leds]
|
||||
gcode:
|
||||
{% set red = params.RED|default(0)|float %}
|
||||
{% set green = params.GREEN|default(0)|float %}
|
||||
{% set blue = params.BLUE|default(0)|float %}
|
||||
{% set white = params.WHITE|default(0)|float %}
|
||||
{% set led = printer["gcode_macro _sb_vars"].logo_led_name %}
|
||||
{% set idx = printer["gcode_macro _sb_vars"].logo_idx %}
|
||||
{% set transmit=params.TRANSMIT|default(1) %}
|
||||
|
||||
_set_sb_leds led={led} red={red} green={green} blue={blue} white={white} idx="{idx}" transmit={transmit}
|
||||
_set_sb_leds LED={led} RED={red} GREEN={green} BLUE={blue} IDX="{idx}" TRANSMIT={transmit}
|
||||
|
||||
[gcode_macro _set_nozzle_leds]
|
||||
gcode:
|
||||
{% set red = params.RED|default(0)|float %}
|
||||
{% set green = params.GREEN|default(0)|float %}
|
||||
{% set blue = params.BLUE|default(0)|float %}
|
||||
{% set white = params.WHITE|default(0)|float %}
|
||||
{% set led = printer["gcode_macro _sb_vars"].nozzle_led_name %}
|
||||
{% set idx = printer["gcode_macro _sb_vars"].nozzle_idx %}
|
||||
{% set transmit=params.TRANSMIT|default(1) %}
|
||||
|
||||
_set_sb_leds led={led} red={red} green={green} blue={blue} white={white} idx="{idx}" transmit={transmit}
|
||||
_set_sb_leds LED={led} RED={red} GREEN={green} BLUE={blue} IDX="{idx}" TRANSMIT={transmit}
|
||||
|
||||
[gcode_macro set_logo_leds_off]
|
||||
gcode:
|
||||
{% set transmit=params.TRANSMIT|default(1) %}
|
||||
_set_logo_leds red=0 blue=0 green=0 white=0 transmit={transmit}
|
||||
_set_logo_leds RED=0 BLUE=0 GREEN=0 TRANSMIT={transmit}
|
||||
|
||||
[gcode_macro set_nozzle_leds_on]
|
||||
gcode:
|
||||
|
||||
Reference in new issue
Block a user