What's new
VORON Design

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members!

Klipper LED effect

Here are the relevant definition blocks in my config.
Code:
[led_effect logo_homing]
leds:
    neopixel:sb_leds (1-8)
autostart: false
frame_rate: 24
endstops: x, y, z
layers:
    static 0 0 subtract (0.5,0.5,0.5)
    breathing 8 0 add (0,0.6,0.2),(0,0.46,0.15)
    chase 0.25 0.25 add (0,0.6,0.2)
    homing 4 0 top (0.75,0.75,1.0)

[led_effect logo_meshing]
leds:
    neopixel:sb_leds (1-8)
autostart: false
frame_rate: 24
endstops: z, probe
layers:
    static 0 0 subtract (0.5,0.5,0.5)
    chase -0.30 0.40 add (0.2,1.0,0.0),(0.75,0.79,0.00)
    homing 2.5 0 top (0.75,0.75,1.0)
The magic is first defining the endstops, then that homing layer and putting it on top. With the above definition my SB logo LED flashes white when the endstop is triggered. It was tough to get that figured out (I had to get assistance from the developer).
Sorry to drag this thread up from the dead, im struggling to get my homing to work, i can get the breating and chase to work, but triggering the end stops (sensored z and sensorless X and Y on a voron 0.2) doesnt add any effect, not sure if i am missing something simple?

[neopixel bed_light]
pin: gpio24
chain_count: 14
color_order: GRBW
initial_RED: 0.0
initial_GREEN: 0.0
initial_BLUE: 0.0
initial_WHITE: 0.0

[led_effect sb_bed_homing]
autostart: false
frame_rate: 24
endstops: x, y, z
leds:
neopixel:bed_light
layers:
breathing 3 1 add (0.0, 0.6, 0.2, 0.0)
#chase 0.25 0.25 add (0, 0.6, 0.2, 0.0)
homing 1 0 top (0.0, 0.0, 0.0, 1.0)


Any ideas?
 
Hi @Mr.P1nky1989,
For an effect that reacts on the endstop you have to use the "homing" effect. This will light up when the endstops are pressed during homing or probing. Make sure the effect is active before you start homing (set autostart or use SET_LED_EFFECT)

To test maybe try putting only the homing effect and see if you can get that to work. Try (1,1,1,1) as color.

To combine it with another effect a useful method is to set the color of the homing effect to white and multiply it to another effect. This will activate the underlying effects when the homing effect is active.

Example:

Code:
[led_effect homing_chamber]
autostart: false
leds:
neopixel:chamber_light
layers:
homing 2.0 0 multiply (1,1,1)
gradient 0.5 2 top (1,0,0),(0,1,0),(0,0,1)
endstops: z,probe
 
Yeah, it looks like it might be broken. I've had the homing effect working on my Trident and V0.2 for a while now. Just homed the V0.2 and no LED indication, so the effect didn't work.

The definition posted above looks correct.
 
Apparently due to some internal Klipper changes the endstops now have to be called "stepper_x, stepper_y and stepper_z" instead of just "x, y and z". "probe" stays unchanged. So define your effect like this and it should work:

Code:
[led_effect sb_bed_homing]
autostart: false
frame_rate: 24
endstops: stepper_x, stepper_y, stepper_z
leds:
    neopixel:bed_light
layers:
    breathing 3 1 add (0.0, 0.6, 0.2, 0.0)
    #chase 0.25 0.25 add (0, 0.6, 0.2, 0.0)
    homing 1 0 top (0.0, 0.0, 0.0, 1.0)

I will correct the documentation.
 
Top