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

You are missing indenting. That's very important in the config files. This ought to work:
Code:
[neopixel bottom_leds]
pin: PB6
chain_count: 42
color_order: GRB
initial_RED: 0.0
initial_GREEN: 0.0
initial_BLUE: 0.0

[led_effect homing_probe]
autostart: true
frame_rate: 24
leds:
    neopixel: bottom_leds
endstops: x, y, z, probe
layers:
    homing 2.5 0 add (0.3, 0.3, 0.4)

Edit: I noticed just after posting that the homing definition also had RGBW. I removed the W setting as it's no needed (your color order only has GRB, not GRBW).
 
You are missing indenting. That's very important in the config files. This ought to work:
Code:
[neopixel bottom_leds]
pin: PB6
chain_count: 42
color_order: GRB
initial_RED: 0.0
initial_GREEN: 0.0
initial_BLUE: 0.0

[led_effect homing_probe]
autostart: true
frame_rate: 24
leds:
    neopixel: bottom_leds
endstops: x, y, z, probe
layers:
    homing 2.5 0 add (0.3, 0.3, 0.4)

Edit: I noticed just after posting that the homing definition also had RGBW. I removed the W setting as it's no needed (your color order only has GRB, not GRBW).
Thanks, that's clear for me, I did not look at this on copy&paste the code. This is how it looks:
1685541656869.png
but does not work :( Any other hints?
 
A couple of questions:
1. What exactly is bottom_leds defining?
This is my exact definition from my working config. I have the original Rainbow Barf logo PCB and the spec nozzle NeoPixels:
Code:
[neopixel sb_leds]
pin: PB0
#chain_count: 3
chain_count: 10
color_order: GRB, GRB, GRB, GRB, GRB, GRB, GRB, GRB, GRBW,  GRBW
initial_RED: 0.0
initial_GREEN: 0.0
initial_BLUE: 1.0
initial_WHITE: 0.0
# logo (Rainbow Barf PCB) = neopixel:sb_leds (1-8)
# nozzle = neopixel:sb_leds (9,10)
Note the color_order definition. THat allows using both the RGB Rainbow Barf and the RGBW NeoPixels in the same string. Also note my reminder comments at the end; I always define the effects with those exact callouts for the leds on each, and I define the logo & nozzle separately.

2. Is the spacing in your definition spaces or tabs? I'm also not sure if endstops will work as separate lines--I've left mine as a single line as I posted earlier.

Another thought occurred to me. You only have the single definition and set it as add. Change it to top and see if that makes a difference. That and the order you place the various layers makes a big difference (and the simulator doesn't always match actual real behavior).
 
On a slightly different topic, I have a tip for setting colors. I kept getting really bright, washed out colors on my case WS2812B strips, and to some extent the Rainbow Barf logo LED. I found that by putting static 0 0 subtract (0.5,0.5,0.5) as the first layer brought down the brightness and gave me richer colors.
 
A couple of questions:
1. What exactly is bottom_leds defining?
This is my exact definition from my working config. I have the original Rainbow Barf logo PCB and the spec nozzle NeoPixels:
Code:
[neopixel sb_leds]
pin: PB0
#chain_count: 3
chain_count: 10
color_order: GRB, GRB, GRB, GRB, GRB, GRB, GRB, GRB, GRBW,  GRBW
initial_RED: 0.0
initial_GREEN: 0.0
initial_BLUE: 1.0
initial_WHITE: 0.0
# logo (Rainbow Barf PCB) = neopixel:sb_leds (1-8)
# nozzle = neopixel:sb_leds (9,10)
Note the color_order definition. THat allows using both the RGB Rainbow Barf and the RGBW NeoPixels in the same string. Also note my reminder comments at the end; I always define the effects with those exact callouts for the leds on each, and I define the logo & nozzle separately.

2. Is the spacing in your definition spaces or tabs? I'm also not sure if endstops will work as separate lines--I've left mine as a single line as I posted earlier.

Another thought occurred to me. You only have the single definition and set it as add. Change it to top and see if that makes a difference. That and the order you place the various layers makes a big difference (and the simulator doesn't always match actual real behavior).
Thanks for your help! I really don't know where the problem was, something was written wrong as it seems... I completly rewrote the code several times with no success. Now I copied a working configuration from other effects and changed the parts for homing - and it's working :)
 
Anybody have a cfg file I can start with for case light effects? (I have a ring of neos all around the top for general illumunation)

Thanks
 
Anybody have a cfg file I can start with for case light effects? (I have a ring of neos all around the top for general illumunation)

Thanks
have fun :)
 

Attachments

  • stealthburner_led_effects_barf.cfg.txt
    24.5 KB · Views: 14
These should keep you busy for a while. 😁
I just took a peek and....Wow, you have been busy with your Clark Griswald lights going on. I am going to have to look at "borrowing" some of your config.
 
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).
 
So even if I don't have a mechanical end stop, I would need to add "endstops: x, y, z" ?

If I don't have a logo led at the moment, adding homing to the top should also be required right?

Example
[led_effect Caselights_homing]

Thank you for sharing by the way.
 
Yes, you're telling led_effects what axis you want it to trigger on. The effect can be sent to any NeoPixel LED, I just picked my logo for the Trident. On my V0.2 (sensorless homing on X & Y) I have the case lights flash for X and Y, and the bed LED flash for Z.
 
Top