MapleLeafMakers / klipper-virtual_leds

Virtual LED chains composed of segments of physical led chains... for klipper.
GNU General Public License v3.0
16 stars 2 forks source link

How to use together with Klipper-led-effect ? #3

Open bartagergely opened 6 months ago

bartagergely commented 6 months ago

I have 3 portion of LEDs chained to the same port: 2x Rainbow on a matchstick, and the 8 LEDs on the Kirigami bed. I try to use them as separate strips, and configured the following:

[neopixel chamber_neo]
pin:PA9
chain_count:28
color_order: GRB
initial_RED: 0.2
initial_GREEN: 0.2
initial_BLUE: 0.2

[virtual_leds left_rainbow]
leds: neopixel:chamber_neo (11,20)

[virtual_leds right_rainbow]
leds: neopixel:chamber_neo (1,10)

[virtual_leds bed_leds]
leds: neopixel:chamber_neo (21,28)

[led_effect rainbow_idle]
autostart: true
leds:    
   neopixel:bed_leds
layers:
    gradient  0.3  1 add (0.3, 0.0, 0.0),(0.0, 0.3, 0.0),(0.0, 0.0, 0.3)
frame_rate: 40

With the above configuration I get the following error?

Internal error during ready callback: Unknown config object 'neopixel bed_leds'
Once the underlying issue is corrected, use the
"FIRMWARE_RESTART" command to reset the firmware, reload the
config, and restart the host software.
Printer is shutdown

Is somehow possible to use single port attached LEDs as multiple led strips, together with klipper-led-effect?

bartagergely commented 6 months ago

Nevermind... First I did not get the logic behind it, but now everything works as intended. I can separately control the 3 different pack of LEDs attached to the same port.

Here is the solution, maybe it will help someone in the future:


[neopixel chamber_neo]
pin:PA9
chain_count:28
color_order: GRB
initial_RED: 0
initial_GREEN: 0
initial_BLUE: 0

[virtual_leds left_rainbow]
leds: neopixel:chamber_neo (11-20)

[virtual_leds right_rainbow]
leds: neopixel:chamber_neo (1-10)

[virtual_leds bed_leds]
leds: neopixel:chamber_neo (21-28)

[led_effect rainbow_idle]
autostart: true
leds:    
   virtual_leds:bed_leds
layers:
    gradient  0.3  1 add (0.3, 0.0, 0.0),(0.0, 0.3, 0.0),(0.0, 0.0, 0.3)
frame_rate: 40