julianschill / klipper-led_effect

LED effects plugin for klipper
GNU General Public License v3.0
647 stars 117 forks source link

mcu shotdown #136

Closed Eloura74 closed 9 months ago

Eloura74 commented 1 year ago

hello, I love your Led_effect configuration, I test a lot of different things, I have a stealthburner on a switchwire, with a pcb of 8 leds for the logo, 2 leds for the nozzle, and a bar of 10 leds for the effects in my box.? the problem and that during the tests everything works fine, but if I include them in , the prechquffe, the start_print etc, if I ask a little too much the mcu down ..... I am with an rpi4, canbus sb2040, spider v2.3..... ideas? THANKS

julianschill commented 1 year ago

I never tested it with CAN, so that might be the issue. Keep the framerates down to reduce the load on the bus. I also recommend running a separate MCU for the LEDs for more then 15 LEDs.

Eloura74 commented 1 year ago

ok great thank you for the answer and again for your work! i will put an arduino as secondary mcu and i think it will do, thanks last question, do you know if it is possible to put a color palette to manage the leds from the mainsail interface

Le jeu. 2 mars 2023, 00:47, Julian Schill @.***> a écrit :

I never tested it with CAN, so that might be the issue. Keep the framerates down to reduce the load on the bus. I also recommend running a separate MCU for the LEDs for more then 15 LEDs.

— Reply to this email directly, view it on GitHub https://github.com/julianschill/klipper-led_effect/issues/136#issuecomment-1451039755, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWY4GSSEFLXIGCIJEUEPENTWZ7NXRANCNFSM6AAAAAAVKVQGAM . You are receiving this because you authored the thread.Message ID: @.***>

julianschill commented 1 year ago

I don't think there will be any UI support for this plugin ever. But you should still be able to set colors with the color picker when no effect is active.

Eloura74 commented 1 year ago

yes it is, thank you it was just to make it more...design the thing😉

Le jeu. 2 mars 2023, 08:16, Julian Schill @.***> a écrit :

I don't think there will be any UI support for this plugin ever. But you should still be able to set colors with the color picker when no effect is active.

— Reply to this email directly, view it on GitHub https://github.com/julianschill/klipper-led_effect/issues/136#issuecomment-1451401226, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWY4GSTLVVEMQHF7OB5TT2DW2BCNFANCNFSM6AAAAAAVKVQGAM . You are receiving this because you authored the thread.Message ID: @.***>

Surion79 commented 1 year ago

you could also check if you have the correct can bus rate set up. should be (at least) 500000

Eloura74 commented 1 year ago

Yes i am 1 000 000 😉. Non worry, i try with Arduino soon

Le jeu. 2 mars 2023, 18:05, Surion79 @.***> a écrit :

you could also check if you have the correct can bus rate set up. should be (at least) 500000

— Reply to this email directly, view it on GitHub https://github.com/julianschill/klipper-led_effect/issues/136#issuecomment-1452215988, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWY4GSSGIIGR7EFRAAEPCFDW2DHPPANCNFSM6AAAAAAVKVQGAM . You are receiving this because you authored the thread.Message ID: @.***>

julianschill commented 1 year ago

Better use a 32bit Microcontroller like STM32 or RP2040

Eloura74 commented 1 year ago

?? what are you thinking about? I have a pi4 with klipper on it, an SB 2040 for Can of the stealthburner, but in stock I have a skr E3V3 card, 2pizero, 1 pi 400, 4arduino, and 3 sb2040(Can).....i can do What.... you don't have messenger to chat?

Le jeu. 2 mars 2023, 19:55, Julian Schill @.***> a écrit :

Better use a 32bit Microcontroller like STM32 or RP2040

— Reply to this email directly, view it on GitHub https://github.com/julianschill/klipper-led_effect/issues/136#issuecomment-1452393684, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWY4GSQ4KUJXUQZWCZO3GQLW2DUI3ANCNFSM6AAAAAAVKVQGAM . You are receiving this because you authored the thread.Message ID: @.***>

Surion79 commented 1 year ago

if you go for an additional board for LEDs on the SB, don't forget that you need to route the additional wire(s)

Eloura74 commented 1 year ago

Yes 😉

Le jeu. 2 mars 2023, 20:01, Surion79 @.***> a écrit :

if you go for an additional board for LEDs on the SB, don't forget that you need to route the additional wire(s)

— Reply to this email directly, view it on GitHub https://github.com/julianschill/klipper-led_effect/issues/136#issuecomment-1452406396, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWY4GSX2WWAIH7MJZJOPKBTW2DVAXANCNFSM6AAAAAAVKVQGAM . You are receiving this because you authored the thread.Message ID: @.***>

julianschill commented 1 year ago

I use RPI Picos and Bluepills. Klipper Expander would be another option. Most of the times a level shifzer is not needed. You can contact me on Discord if you want. Hagbard#7867

Eloura74 commented 1 year ago

I also wanted to know, if I am in this configuration: power supply which arrives at the neopixel of the logo (the 8leds rainbow), which leaves at a neo of the bise which leaves at the last ..... I took your config for the leds but I wanted to know if in a single power supply I can have two buttons in klipper....one for logo one for nozzle....

Le jeu. 2 mars 2023, 20:02, Quentin Faber @.***> a écrit :

Yes 😉

Le jeu. 2 mars 2023, 20:01, Surion79 @.***> a écrit :

if you go for an additional board for LEDs on the SB, don't forget that you need to route the additional wire(s)

— Reply to this email directly, view it on GitHub https://github.com/julianschill/klipper-led_effect/issues/136#issuecomment-1452406396, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWY4GSX2WWAIH7MJZJOPKBTW2DVAXANCNFSM6AAAAAAVKVQGAM . You are receiving this because you authored the thread.Message ID: @.***>

Eloura74 commented 1 year ago

hello, is there no faster way to make a gradient from light blue to dark blue, which goes green to light purple and then dark purple? knowing that the main line of print1 does not give me the blue gradient but rather rainbow....? THANKS

Leds Steatlhburner (8x GRB et 2x GRBW): [neopixel sb_leds]

pin: SB2040:RGBLED

chain_count: 10 color_order: GRB, GRB, GRB, GRB, GRB, GRB, GRB, GRB, GRBW, GRBW initial_RED: 0 initial_GREEN: 0 initial_BLUE: 0 initial_WHITE: 0

####################################################################

Leds Barre Imprimante (10x GRBW):

[neopixel barre_leds]

pin: PD3

chain_count: 10 color_order: GRBW initial_RED: 0 initial_GREEN: 0 initial_BLUE: 0 initial_WHITE: 0

####################################################################

Description des couleurs:

Logo:

-Off: off

-Rouge: busy

-Bleu pâle: cleaning

-Jaune: heating

-Rose: homing

-Blanc: leveling

-Orange: meshing

-Vert: printing

-Bleu: print

Nozzle:

-Off: off

-Blanc: on

-Vert: heating

-Blanc: print

Barre:

-Off: off

-Rouge: busy

-Bleu pâle: cleaning

-Jaune: heating

-Rose: homing

-Blanc: leveling

-Orange: meshing

-Vert: printing

-Bleu: print

[gcode_macro _sb_vars]

variable_colors: {

Couleur de la barre:

     'barre': {
        'busy': {'r': 0.8, '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.01, 'g': 0.01, 'b': 0.01, 'w': 0.0},
        'print': {'r': 0.0, 'g': 0.0, 'b': 0.7, 'w': 0.0},
        'rouge': {'r':0.8, 'g':0.0, 'b':0.0, 'w':0.0},
        'vert': {'r':0.0, 'g':0.8, 'b':0.00, 'w':0.0},
        'bleu': {'r':0.0, 'g':0.0, 'b':0.8, 'w':0.0},
        'violet': {'r':0.4, 'g':0.0, 'b':0.8, 'w':0.0},
        'mauve': {'r':0.9, 'g':0.0, 'b':0.9, 'w':0.0},
        'jaune': {'r':0.9, 'g':0.9, 'b':0.0, 'w':0.0},
        'cyan': {'r':0.3, 'g':0.2, 'b':0.6, 'w':0.0},
        'on': {'r':0.8, 'g':0.8, 'b':0.8, 'w':0.0},
        'glace': {'r':0.0, 'g':0.8, 'b':0.9, 'w':0.2},
        'feu': {'r':1.0, 'g':0.27, 'b':0.0, 'w':0.2},
     },

Couleur du logo Z

    'logo': {
        'busy': {'r': 0.8, '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},
        'on': {'r': 1.0, 'g': 1.0, 'b': 1.0, 'w':0.0},
        'printing': {'r': 1.0, 'g': 0.0, 'b': 0.0, 'w': 0.0},
        'standby': {'r': 0.01, 'g': 0.01, 'b': 0.01, 'w': 0.0},
        'print': {'r':0.0, 'g':0.0, 'b':0.55, 'w':0.0},
        'rouge': {'r':0.8, 'g':0.0, 'b':0.0, 'w':0.0},
        'vert': {'r':0.0, 'g':0.8, 'b':0.00, 'w':0.0},
        'bleu': {'r':0.0, 'g':0.0, 'b':0.8, 'w':0.0},
        'violet': {'r':0.4, 'g':0.0, 'b':0.8, 'w':0.0},
        'mauve': {'r':0.9, 'g':0.0, 'b':0.9, 'w':0.0},
        'jaune': {'r':0.9, 'g':0.9, 'b':0.0, 'w':0.0},
        'cyan': {'r':0.3, 'g':0.2, 'b':0.6, 'w':0.0},
        'glace': {'r':0.0, 'g':0.8, 'b':0.9, 'w':0.2},
        'feu': {'r':1.0, 'g':0.27, 'b':0.0, 'w':0.2},
    },

Couleur de la buse

    'nozzle': {
        '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': 1.0, 'g': 1.0, 'b': 1.0, 'w':0.0},
        'standby': {'r': 0.6, 'g': 0.0, 'b': 0.0, 'w':0.0},
        'print': {'r': 0.8, 'g': 0.8, 'b': 0.8, 'w':0.0},
        'rouge': {'r':0.8, 'g':0.0, 'b':0.0, 'w':0.0},
        'vert': {'r':0.0, 'g':0.8, 'b':0.00, 'w':0.0},
        'bleu': {'r':0.0, 'g':0.0, 'b':0.8, 'w':0.0},
        'violet': {'r':0.4, 'g':0.0, 'b':0.8, 'w':0.0},
        'mauve': {'r':0.9, 'g':0.0, 'b':0.9, 'w':0.0},
        'jaune': {'r':0.9, 'g':0.9, 'b':0.0, 'w':0.0},
        'cyan': {'r':0.3, 'g':0.2, 'b':0.6, 'w':0.0},
        'leveling': {'r': 0.5, 'g': 0.1, 'b': 0.4, 'w': 0.0},
        'glace': {'r':0.0, 'g':0.8, 'b':0.9, 'w':0.2},
        'feu': {'r':1.0, 'g':0.27, 'b':0.0, 'w':0.2},
    },

Couleur en fonction Température:

    '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}
    },
}

Noms des differentes Variables:

Le nom de la chaîne de LED adressables qui contient le(s) logo(s) LED.

variable_logo_led_name: "sb_leds"

Numéro des LED séparés par des virgules dans le logo.

variable_logo_idx: "1,2,3,4,5,6,7,8"

Le nom de la chaîne de LED adressables qui contient la ou les LED de la

buse. variable_nozzle_led_name: "sb_leds"

Numéro des LED séparés par des virgules dans la buse.

variable_nozzle_idx: "9,10"

Le nom de la chaîne de LED adressables qui contient Barre LED.

variable_barre_led_name: "barre_leds"

Numéro des LED séparés par des virgules dans la barre.

variable_barre_idx: "1,2,3,4,5,6,7,8,9,10"

Températures auxquelles le refroidissement sera considéré comme complet:

variable_thermal_config: { 'extruder': { 'cool_temp': 40, 'leds': 'logo', }, 'heater_bed': { 'cool_temp': 50, 'leds': 'nozzle', }, }

######################################################################################################################### ######################################## ATTENTION NE PAS TOUCHER ####################################################### ######################################################################################################################### gcode:

[gcode_macro _set_sb_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 = 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} {% endfor %}

[gcode_macro _set_sb_leds_by_name] gcode: {% set leds_name = params.LEDS %} {% set color_name = params.COLOR %} {% set color = printer["gcode_macro _sb_vars"].colors[leds_name][color_name] %} {% set led = printer["gcode_macro _sb_vars"][leds_name + "_led_name"] %} {% 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}

[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}

[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}

[gcode_macro _set_barre_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"].barre_led_name %} {% set idx = printer["gcode_macro _sb_vars"].barre_idx %} {% set transmit=params.TRANSMIT|default(1) %}

_set_sb_leds led={led} red={red} green={green} blue={blue}

white={white} idx="{idx}" transmit={transmit} ############################################################################################################################# ############################################################################################################################# ############################################## Création de différents MACRO ################################################# #############################################################################################################################

Test:

Effet rainbow bleu sur logo2:

[led_effect chauffe_logo2] leds: neopixel:sb_leds (1,2,3,4,5,6,7,8) autostart: false frame_rate: 24 layers: gradient 0.3 1 add (0.0, 0.2, 0.5),(0.0, 0.8, 0.0),(0.0, 0.2, 0.8)

Macro :

[gcode_macro chauffe_logo2] gcode: STOP_LED_EFFECTS SET_LED_EFFECT EFFECT=chauffe_logo2

[led_effect rainbow_barre] leds: neopixel:barre_leds (1,2,3,4,5,6,7,8,9,10) autostart: false frame_rate: 24 layers: gradient 0.3 1 add (0.0, 0.0, 0.3),(0.0, 0.6, 0.0),(0.0, 0.0, 1)

Macro :

[gcode_macro rainbow_barre] gcode: STOP_LED_EFFECTS SET_LED_EFFECT EFFECT=rainbow_barre

############### Led EFFETS ################

Arrêter les effets:

[gcode_macro effects_off] gcode: STOP_LED_EFFECTS

########################################################################################################

Effet rainbow bleu sur logo:

[led_effect chauffe_logo] leds: neopixel:sb_leds (1,2,3,4,5,6,7,8) autostart: false frame_rate: 24 layers: gradient 0.3 1 add (0.0, 0.0, 0.3),(0.0, 0.3, 0.0),(0.0, 0.0, 0.5)

Macro :

[gcode_macro chauffe_logo] gcode: STOP_LED_EFFECTS SET_LED_EFFECT EFFECT=chauffe_logo

######################################################################################################## [led_effect bed_hot] leds:

neopixel:sb_leds (1,2,3,4,5,6,7,8)

neopixel:sb_leds (9,10)                      # Choix des LEDS

autostart: false # Démarrage ou non avec Klipper frame_rate: 24 # Définit la fréquence d'allumage par seconde pour l'effet heater: heater_bed # extruder layers: heater 30.00 0 top (0.04,0.04,1.00,0.00) heater 30.30 0 top (0.04,0.04,1.00,0.00) heater 30.60 0 top (0.04,0.04,1.00,0.00) heater 30.90 0 top (0.04,0.04,1.00,0.00) heater 31.20 0 top (0.04,0.04,1.00,0.00) heater 31.50 0 top (0.05,0.04,1.00,0.00) heater 31.80 0 top (0.05,0.05,1.00,0.00) heater 32.10 0 top (0.06,0.06,1.00,0.00) heater 33.40 0 top (0.07,0.07,1.00,0.00) heater 33.70 0 top (0.08,0.08,1.00,0.00) heater 34.00 0 top (0.09,0.10,1.00,0.00) heater 34.30 0 top (0.11,0.12,1.00,0.00) heater 34.60 0 top (0.13,0.13,1.00,0.00) heater 34.90 0 top (0.15,0.15,1.00,0.00) heater 35.20 0 top (0.16,0.17,0.99,0.00) heater 35.50 0 top (0.18,0.19,0.99,0.00) heater 35.80 0 top (0.20,0.21,0.99,0.00) heater 36.10 0 top (0.23,0.23,0.99,0.00) heater 36.40 0 top (0.25,0.25,0.98,0.00) heater 36.70 0 top (0.27,0.27,0.98,0.00) heater 37.00 0 top (0.29,0.31,0.98,0.00) heater 37.30 0 top (0.31,0.42,0.96,0.00) heater 37.60 0 top (0.31,0.50,0.94,0.00) heater 38.90 0 top (0.31,0.57,0.92,0.00) heater 39.20 0 top (0.31,0.63,0.89,0.00) heater 39.50 0 top (0.31,0.69,0.86,0.00) heater 39.80 0 top (0.31,0.74,0.84,0.00) heater 40.10 0 top (0.30,0.78,0.80,0.00) heater 41.40 0 top (0.29,0.82,0.76,0.00) heater 41.70 0 top (0.27,0.86,0.72,0.00) heater 42.00 0 top (0.25,0.89,0.66,0.00) heater 42.30 0 top (0.23,0.93,0.58,0.00) heater 42.60 0 top (0.20,0.96,0.50,0.00) heater 42.90 0 top (0.16,0.98,0.41,0.00) heater 43.20 0 top (0.13,0.99,0.33,0.00) heater 43.50 0 top (0.09,1.00,0.25,0.00) heater 43.80 0 top (0.07,1.00,0.14,0.00) heater 44.10 0 top (0.08,1.00,0.20,0.00) heater 44.40 0 top (0.07,1.00,0.24,0.00) heater 44.70 0 top (0.08,1.00,0.25,0.00) heater 45.00 0 top (0.11,1.00,0.23,0.00) heater 45.30 0 top (0.10,1.00,0.18,0.00) heater 45.60 0 top (0.09,1.00,0.14,0.00) heater 45.90 0 top (0.18,1.00,0.22,0.00) heater 46.20 0 top (0.27,0.99,0.25,0.00) heater 46.50 0 top (0.36,0.98,0.28,0.00) heater 46.80 0 top (0.45,0.97,0.29,0.00) heater 47.10 0 top (0.53,0.96,0.29,0.00) heater 47.40 0 top (0.62,0.94,0.27,0.00) heater 47.70 0 top (0.71,0.92,0.23,0.00) heater 48.00 0 top (0.79,0.90,0.16,0.00) heater 48.30 0 top (0.86,0.88,0.10,0.00) heater 48.60 0 top (0.91,0.86,0.20,0.00) heater 48.90 0 top (0.95,0.84,0.25,0.00) heater 49.20 0 top (0.98,0.82,0.27,0.00) heater 49.50 0 top (0.98,0.82,0.27,0.00) heater 49.80 0 top (0.98,0.82,0.24,0.00) heater 50.10 0 top (0.99,0.82,0.16,0.00) heater 50.40 0 top (1.00,0.82,0.15,0.00) heater 50.70 0 top (1.00,0.82,0.13,0.00) heater 51.00 0 top (1.00,0.82,0.10,0.00) heater 51.30 0 top (1.00,0.83,0.06,0.00) heater 51.60 0 top (1.00,0.83,0.03,0.00) heater 51.90 0 top (1.00,0.82,0.09,0.00) heater 52.20 0 top (1.00,0.81,0.12,0.00) heater 52.50 0 top (1.00,0.80,0.14,0.00) heater 52.80 0 top (1.00,0.80,0.16,0.00) heater 53.10 0 top (1.00,0.78,0.17,0.00) heater 53.40 0 top (1.00,0.77,0.18,0.00) heater 53.70 0 top (1.00,0.76,0.18,0.00) heater 54.00 0 top (1.00,0.75,0.19,0.00) heater 54.30 0 top (1.00,0.74,0.19,0.00) heater 54.60 0 top (1.00,0.72,0.20,0.00) heater 54.90 0 top (1.00,0.71,0.20,0.00) heater 55.20 0 top (1.00,0.68,0.20,0.00) heater 55.50 0 top (1.00,0.66,0.20,0.00) heater 55.80 0 top (1.00,0.64,0.20,0.00) heater 56.10 0 top (1.00,0.62,0.19,0.00) heater 56.40 0 top (1.00,0.60,0.18,0.00) heater 56.70 0 top (1.00,0.57,0.16,0.00) heater 57.00 0 top (1.00,0.54,0.15,0.00) heater 57.30 0 top (1.00,0.51,0.14,0.00) heater 57.60 0 top (1.00,0.47,0.13,0.00) heater 57.90 0 top (1.00,0.43,0.11,0.00) heater 58.20 0 top (1.00,0.39,0.10,0.00) heater 58.50 0 top (1.00,0.37,0.08,0.00) heater 58.80 0 top (1.00,0.36,0.06,0.00) heater 59.10 0 top (1.00,0.33,0.05,0.00) heater 59.40 0 top (1.00,0.31,0.04,0.00) heater 59.70 0 top (1.00,0.29,0.02,0.00) heater 60.00 0 top (1.00,0.27,0.02,0.00) heater 60.30 0 top (1.00,0.26,0.01,0.00) heater 60.60 0 top (1.00,0.24,0.01,0.00) heater 60.90 0 top (1.00,0.22,0.00,0.00) heater 61.20 0 top (1.00,0.20,0.00,0.00) heater 61.50 0 top (1.00,0.18,0.00,0.00) heater 61.80 0 top (1.00,0.16,0.00,0.00) heater 62.10 0 top (1.00,0.15,0.00,0.00) heater 62.40 0 top (1.00,0.13,0.00,0.00) heater 62.70 0 top (1.00,0.11,0.00,0.00) heater 63.00 0 top (1.00,0.09,0.00,0.00) heater 63.30 0 top (1.00,0.07,0.00,0.00) heater 63.60 0 top (1.00,0.05,0.00,0.00) heater 63.90 0 top (1.00,0.04,0.00,0.00) heater 64.20 0 top (1.00,0.02,0.00,0.00) heater 63.50 0 top (1.00,0.01,0.00,0.00) heater 64.80 0 top (1.00,0.00,0.00,0.00)

MACRO :

[gcode_macro status_print1] gcode: STOP_LED_EFFECTS SET_LED_EFFECT EFFECT=print1

[gcode_macro status_print1] gcode: STOP_LED_EFFECTS SET_LED_EFFECT EFFECT=print1

[led_effect print1] leds:

neopixel:sb_leds (1,2,3,4,5,6,7,8)

neopixel:sb_leds (1,2,3,4,5,6,7,8)                      # Choix des LEDS

autostart: false # Démarrage ou non avec Klipper frame_rate: 12 # 58 # 24,48 # Définit la fréquence d'allumage par seconde pour l'effet layers: gradient 0.3 1.0 add (0.04,0.04,1.00,0.00),(0.04,0.04,1.00,0.00),(0.04,0.04,1.00,0.00),(0.04,0.04,1.00,0.00),(0.04,0.04,1.00,0.00),(0.05,0.04,1.00,0.00),(0.05,0.05,1.00,0.00),(0.06,0.06,1.00,0.00),(0.07,0.07,1.00,0.00),(0.08,0.08,1.00,0.00),(0.09,0.10,1.00,0.00),(0.11,0.12,1.00,0.00),(0.13,0.13,1.00,0.00),(0.15,0.15,1.00,0.00),(0.16,0.17,0.99,0.00),(0.18,0.19,0.99,0.00),(0.20,0.21,0.99,0.00),(0.23,0.23,0.99,0.00),(0.25,0.25,0.98,0.00),(0.27,0.27,0.98,0.00),(0.29,0.31,0.98,0.00),(0.31,0.42,0.96,0.00),(0.31,0.50,0.94,0.00),(0.31,0.57,0.92,0.00),(0.31,0.63,0.89,0.00),(0.16,0.98,0.41,0.00),(0.13,0.99,0.33,0.00),(0.18,1.00,0.22,0.00),(0.27,0.99,0.25,0.00),(0.45,0.97,0.29,0.00),(0.53,0.96,0.29,0.00),(0.62,0.94,0.27,0.00),(0.71,0.92,0.23,0.00),(0.79,0.90,0.16,0.00),(0.86,0.88,0.10,0.00),(0.91,0.86,0.20,0.00),(0.95,0.84,0.25,0.00),(0.98,0.82,0.27,0.00),(0.98,0.82,0.27,0.00),(0.98,0.82,0.24,0.00),(0.99,0.82,0.16,0.00),(1.00,0.82,0.15,0.00),(1.00,0.82,0.13,0.00),(1.00,0.82,0.10,0.00),(1.00,0.83,0.06,0.00),(1.00,0.83,0.03,0.00),(1.00,0.82,0.09,0.00),(1.00,0.81,0.12,0.00),(1.00,0.80,0.14,0.00),(1.00,0.80,0.16,0.00),(1.00,0.78,0.17,0.00),(1.00,0.77,0.18,0.00),(1.00,0.76,0.18,0.00),(1.00,0.75,0.19,0.00),(1.00,0.74,0.19,0.00),(1.00,0.72,0.20,0.00),(1.00,0.71,0.20,0.00),(1.00,0.68,0.20,0.00),(1.00,0.66,0.20,0.00),(1.00,0.64,0.20,0.00),(1.00,0.62,0.19,0.00),(1.00,0.60,0.18,0.00),(1.00,0.57,0.16,0.00),(1.00,0.54,0.15,0.00),(1.00,0.51,0.14,0.00),(1.00,0.47,0.13,0.00),(1.00,0.43,0.11,0.00),(1.00,0.39,0.10,0.00),(1.00,0.37,0.08,0.00),(1.00,0.36,0.06,0.00),(1.00,0.33,0.05,0.00),(1.00,0.31,0.04,0.00),(1.00,0.29,0.02,0.00),(1.00,0.27,0.02,0.00),(1.00,0.26,0.01,0.00),(1.00,0.24,0.01,0.00),(1.00,0.22,0.00,0.00),(1.00,0.20,0.00,0.00),(1.00,0.18,0.00,0.00),(1.00,0.16,0.00,0.00),(1.00,0.15,0.00,0.00),(1.00,0.13,0.00,0.00),(1.00,0.11,0.00,0.00),(1.00,0.09,0.00,0.00),(1.00,0.07,0.00,0.00),(1.00,0.05,0.00,0.00),(1.00,0.04,0.00,0.00),(1.00,0.02,0.00,0.00),(1.00,0.01,0.00,0.00),(1.00,0.00,0.00,0.00)

###############################################################################################

Le jeu. 2 mars 2023 à 00:47, Julian Schill @.***> a écrit :

I never tested it with CAN, so that might be the issue. Keep the framerates down to reduce the load on the bus. I also recommend running a separate MCU for the LEDs for more then 15 LEDs.

— Reply to this email directly, view it on GitHub https://github.com/julianschill/klipper-led_effect/issues/136#issuecomment-1451039755, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWY4GSSEFLXIGCIJEUEPENTWZ7NXRANCNFSM6AAAAAAVKVQGAM . You are receiving this because you authored the thread.Message ID: @.***>

govido commented 1 year ago

I have a very similar configuration (SB2040 with SB barf LED, 10 LEDs total) running with a RPI3 and FYSETC UCAN USB-CAN board. I have a rather unusual led effect, showing progress with the 8 logo LEDs, breathing green with white twinkle effects. After 20-30 minutes my print failed every time with the SB2040 disconnecting.

I disabled the 2 plugins I have installed: led_effect and telegram bot, after that I got a successful print. Now with only telegram disabled i can print without any problems, even at 24fps.

[led_effect sb_logo_printing] autostart: false frame_rate: 24 leds: neopixel:sb_leds (1-8) layers: progress -1.00 0.00 add (0,0.5,0),(0,0.2,0) twinkle -0.10 0.20 add (0.10,0.10,0.10) breathing 10.00 0.00 add (0.0,0.10,0.0)

My canbus settings:

allow-hotplug can0 iface can0 can static bitrate 1000000 up ifconfig $IFACE txqueuelen 1024 pre-up ip link set can0 type can bitrate 1000000 pre-up ip link set can0 txqueuelen 1024

Maybe it is an issue on the raspberry CPU side (at least for me)? The CAN connection never goes beyond 10% (mosty 4%) when monitored with canbusload can0@1000000 -c -t -b -r.

Based on my experience you should check for other plugins breaking core klipper functions, or killing your CPU to create timing issues.

CPU usage without telegram bot: image

With telegram bot, print fails after 20 seconds after starting the plugin again: image

Eloura74 commented 1 year ago

[image: image.png]So I add this to my file, and when do you call the macro in your start_print, at the end?

https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail Sans virus.www.avast.com https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

Le mar. 21 mars 2023 à 16:27, Sebastian @.***> a écrit :

I have a very similar configuration (SB2040 with SB barf LED, 10 LEDs total) running with a RPI3 and FYSETC UCAN USB-CAN board. I have a rather unusual led effect, showing progress with the 8 logo LEDs, breathing green with white twinkle effects. After 20-30 minutes my print failed every time with the SB2040 disconnecting.

I disabled the 2 plugins I have installed: led_effect and telegram bot, after that I got a successful print. Now with only telegram disabled i can print without any problems, even at 24fps.

[led_effect sb_logo_printing] autostart: false frame_rate: 24 leds: neopixel:sb_leds (1-8) layers: progress -1.00 0.00 add (0,0.5,0),(0,0.2,0) twinkle -0.10 0.20 add (0.10,0.10,0.10) breathing 10.00 0.00 add (0.0,0.10,0.0)

My canbus settings:

allow-hotplug can0 iface can0 can static bitrate 1000000 up ifconfig $IFACE txqueuelen 1024 pre-up ip link set can0 type can bitrate 1000000 pre-up ip link set can0 txqueuelen 1024

Maybe it is an issue on the raspberry CPU side (at least for me)? The CAN connection never goes beyond 10% (mosty 4%) when monitored with canbusload @.*** -c -t -b -r.

Based on my experience you should check for other plugins breaking core klipper functions, or killing your CPU to create timing issues.

CPU usage without telegram bot: [image: image] https://user-images.githubusercontent.com/12106056/226654445-08bc8eb6-3422-4103-9708-1810b522d5fb.png

With telegram bot, print fails after 20 seconds after starting the plugin again: [image: image] https://user-images.githubusercontent.com/12106056/226655074-50cd77e6-9044-4710-9ded-6ee1296b5fb2.png

— Reply to this email directly, view it on GitHub https://github.com/julianschill/klipper-led_effect/issues/136#issuecomment-1478041979, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWY4GSU3MA2KE426R4XKSPDW5HCHNANCNFSM6AAAAAAVKVQGAM . You are receiving this because you authored the thread.Message ID: @.***>

Eloura74 commented 1 year ago

the rendering should be like this?

Eloura74 commented 1 year ago

leds_sb.zip https://drive.google.com/file/d/15dvccoorTjSPlS_DlnsenLSz5XOP5y81/view?usp=drive_web

https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail Sans virus.www.avast.com https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

Le mar. 21 mars 2023, 23:50, Quentin Faber @.***> a écrit :

the rendering should be like this?

govido commented 1 year ago

Not sure what you are asking for here... (cant access the file) I use the sample LED config from this project, just with changed effects for the logo LED. But this issue is not about setting up your nice blinking light, but canbus problems.

Eloura74 commented 1 year ago

no, no the can bus is activated and works now (sorry), I tested your config, with the 8 neopixels it's great rendering, but I would like this rendering ("breathing and changing if I may say so") when heating for example (or the progress of the print... Let me explain, during heating (with the same effect, therefore "fixed" red and color breathing), I start from blue when the extruder is cold and turns red until the desired temperature, or when printing... starts from blue (with the same effect) and arrives at red at the end of the print...but always with a gradient

Le jeu. 23 mars 2023 à 00:41, Sebastian @.***> a écrit :

Not sure what you are asking for here... (cant access the file) I use the sample LED config from this project, just with changed effects for the logo LED. But this issue is not about setting up your nice blinking light, but canbus problems.

— Reply to this email directly, view it on GitHub https://github.com/julianschill/klipper-led_effect/issues/136#issuecomment-1480392380, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWY4GSTURWUYBS7SXHQE2G3W5OE35ANCNFSM6AAAAAAVKVQGAM . You are receiving this because you authored the thread.Message ID: @.***>

julianschill commented 1 year ago

I feel this issue gets out of topic. It is about MCU shutdown, not about how to achieve an effect. Would there be a possibility to move this to the Voron Discord or maybe the Voron Forums? If not, at least open a new issue for an ureated topic. When answering, avoid quoting of the previous post, to keep it short.

The heating and progress effects use a gradient already. You don't have to create it yourself. For the heater effect keep in mind, that the last value of the palette is switched to when the temperature is reached, so you might want to duplicate it.

govido commented 1 year ago

I got some new results after testing a few things. After looking at the screenshots I didnt actually recall why I went with 64bit OS. Now i changed the installation to 32bit MainsailOS (Pi Imager) and copied all my settings and installed led_effects and telegram bot fresh. Just to be safe i limited the fps for the printing effect to 5fps, no problems so far. Next i will try to use 24fps on a longer print again, maybe it is a 64bit OS problem with canbus timings?

govido commented 1 year ago

After printing a whole set of Stealthburner and Clockwork 2 with Telegram and 24fps LEDs enabled, I can confirm that this plugin is not the issue and even 24fps with 3 layers of effects is easily handled by canbus with my settings.