julianschill / klipper-led_effect

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

uninstall #171

Closed bybarbaros closed 2 months ago

bybarbaros commented 5 months ago

How can I uninstall

julianschill commented 4 months ago

Delete the file ~/klipper/klippy/extras/led_effect.py and remove all your config entries. Additionally delete the folder ~/klipper-led_effects

bybarbaros commented 4 months ago

Thank you Julian... I deleted the files. and reinstalled. I was able to run the macro you made. I use a single LED bar in the system. There are 72 cells. I did this by sharing the LED definition among the relevant macros. I can change the system again when I make a stealburner hotend in the future. I encountered 2 problems. A problem occurs like in the video I uploaded to YouTube. When I open the application, there is a white flash for a moment and the same thing happens with other macros and colors. In the second case, I added a process macro in the start print macro I added to the system before the nozzle cleaning process and added the command to stop the macro when it finished. However, the print start macro does not complete the nozzle cleaning during operation (halfway through the process). LED macro is changing. I couldn't understand the reason for this. I'm adding the relevant macros below. I would be very grateful if you could help.

https://www.youtube.com/watch?v=5Ju65cpjN5U

[neopixel sb_leds] pin: PC5

The pin connected to the neopixel. This parameter must be provided.

chain_count: 72

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 # GRB, GRB, GRB, GRB, GRB, GRB, GRB, GRBW, GRBW

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: 0.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.

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

LED Effects Animations

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

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

logo effects

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

[led_effect sb_logo_busy] autostart: false frame_rate: 24 leds: neopixel:sb_leds (25-50) layers: breathing 3 1 top (1,0,0)

[led_effect sb_logo_cleaning] autostart: false frame_rate: 24 leds: neopixel:sb_leds (25-50) layers: breathing 3 1 top (0.0, 0.02, 0.5)

[led_effect sb_logo_calibrating_z] autostart: false frame_rate: 24 leds: neopixel:sb_leds (25-50) layers: breathing 3 1 top (0.0, 0.0, 0.35)

[led_effect sb_logo_heating] leds: neopixel:sb_leds (25-50) # (1,3,7,8,6,2,63,65,71,72,70,64) autostart: false frame_rate: 24 layers: chase 0.30 0.60 add (1.00,1.00,1.00),(0.0,0.0,0.0) #comet 0.3 0 add (1, 0.18, 0)

[led_effect sb_logo_cooling] leds: neopixel:sb_leds (25-50) autostart: false frame_rate: 24 layers: comet 0.3 0 add (0, 0, 1)

[led_effect sb_logo_homing] autostart: false frame_rate: 24 leds: neopixel:sb_leds (25-50) layers: breathing 3 1 top (0.0, 0.6, 0.2)

[led_effect sb_logo_leveling] autostart: false frame_rate: 24 leds: neopixel:sb_leds (25-50) layers: breathing 3 1 top (0.5, 0.1, 0.4)

[led_effect sb_logo_meshing] autostart: false frame_rate: 24 leds: neopixel:sb_leds (25-50) layers: breathing 3 1 top (0.2, 1.0, 0.0)

[led_effect sb_logo_printing] autostart: false frame_rate: 24 leds: neopixel:sb_leds (25-50) layers: gradient 0.3 1 add (0.3, 0.0, 0.0),(0.3, 0.3, 0.0),(0.3, 0.1, 0.0)

[led_effect sb_logo_standby] autostart: false frame_rate: 24 leds: neopixel:sb_leds (25-50) layers: breathing 3 1 top (0.01, 0.01, 0.01)

[led_effect sb_logo_part_ready] autostart: false frame_rate: 24 leds: neopixel:sb_leds (25-50) layers: breathing 3 1 top (0.0, 1.0, 0.0)

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

nozzle effects

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

[led_effect sb_nozzle_heating] autostart: false frame_rate: 24 leds: neopixel:sb_leds (1,2,3,4,5,6,7,8,9,10,62,63,64,65,66,67,68,69,70,71,72) layers: breathing 3 1 top (1.0, 0.18, 0.0, 0.0)

[led_effect sb_nozzle_cooling] autostart: false frame_rate: 24 leds: neopixel:sb_leds (1,2,3,4,5,6,7,8,9,10,62,63,64,65,66,67,68,69,70,71,72) layers: breathing 3 1 top (0.0, 0.0, 1.0, 0.1)

[led_effect sb_nozzle_standby] autostart: false frame_rate: 24 leds: neopixel:sb_leds (1,2,3,4,5,6,7,8,9,10,62,63,64,65,66,67,68,69,70,71,72) layers: breathing 3 1 top (0.6, 0.0, 0.0, 0.0)

[led_effect sb_nozzle_part_ready] autostart: false frame_rate: 24 leds: neopixel:sb_leds (1,2,3,4,5,6,7,8,9,10,62,63,64,65,66,67,68,69,70,71,72) layers: breathing 3 1 top (0.6, 1.0, 0.0, 0.1)

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

all led effects

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

[led_effect sb_critical_error] leds: neopixel:sb_leds layers: strobe 1 1.5 add (1.0, 1.0, 1.0) breathing 2 0 difference (0.95, 0.0, 0.0) static 1 0 top (1.0, 0.0, 0.0) autostart: false frame_rate: 24 run_on_error: true

[led_effect rainbow] leds: neopixel:sb_leds autostart: true frame_rate: 24 layers: gradient 0.3 1 add (0.3, 0.0, 0.0),(0.0, 0.3, 0.0),(0.0, 0.0, 0.3)

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

LED Effects Statics

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

[led_effect set_nozzle_leds] leds: neopixel:sb_leds (11,12,13,14,15,16,17,18,19,20,21,22,23,24,52,53,54,55,56,57,58,59,60,61)

neopixel:caselight

autostart: false frame_rate: 24 layers: static 0 0 top (0.0, 0.0, 0.0, 1.0)

[led_effect set_logo_leds] leds: neopixel:sb_leds (11,12,13,14,15,16,17,18,19,20,21,22,23,24,52,53,54,55,56,57,58,59,60,61)

neopixel:caselight

autostart: false frame_rate: 24 layers: static 0 0 top (1.0, 1.0, 1.0)

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

The Macros

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

[gcode_macro set_logo_leds_off] gcode: SET_LED_EFFECT EFFECT=set_logo_leds STOP=1

[gcode_macro set_logo_leds_on] gcode: SET_LED_EFFECT EFFECT=set_logo_leds

[gcode_macro set_nozzle_leds_on] gcode: SET_LED_EFFECT EFFECT=set_nozzle_leds

[gcode_macro set_nozzle_leds_off] gcode: SET_LED_EFFECT EFFECT=set_nozzle_leds STOP=1

[gcode_macro status_off] gcode: STOP_LED_EFFECTS

[gcode_macro status_ready] gcode: STOP_LED_EFFECTS SET_LED_EFFECT EFFECT=rainbow

[gcode_macro status_part_ready] gcode: STOP_LED_EFFECTS SET_LED_EFFECT EFFECT=sb_nozzle_part_ready SET_LED_EFFECT EFFECT=sb_logo_part_ready

[gcode_macro status_busy] gcode: STOP_LED_EFFECTS SET_LED_EFFECT EFFECT=sb_logo_busy set_nozzle_leds_on

[gcode_macro status_heating] gcode: STOP_LED_EFFECTS SET_LED_EFFECT EFFECT=sb_logo_heating SET_LED_EFFECT EFFECT=sb_nozzle_heating

[gcode_macro status_cooling] gcode: STOP_LED_EFFECTS SET_LED_EFFECT EFFECT=sb_logo_cooling SET_LED_EFFECT EFFECT=sb_nozzle_cooling

[gcode_macro status_leveling] gcode: STOP_LED_EFFECTS SET_LED_EFFECT EFFECT=sb_logo_leveling set_nozzle_leds_on

[gcode_macro status_homing] gcode: STOP_LED_EFFECTS SET_LED_EFFECT EFFECT=sb_logo_homing set_nozzle_leds_on

[gcode_macro status_cleaning] gcode: STOP_LED_EFFECTS SET_LED_EFFECT EFFECT=sb_logo_cleaning set_nozzle_leds_on

[gcode_macro status_meshing] gcode: STOP_LED_EFFECTS SET_LED_EFFECT EFFECT=sb_logo_meshing set_nozzle_leds_on

[gcode_macro status_calibrating_z] gcode: STOP_LED_EFFECTS SET_LED_EFFECT EFFECT=sb_logo_calibrating_z set_nozzle_leds_on

[gcode_macro status_printing] gcode: STOP_LED_EFFECTS SET_LED_EFFECT EFFECT=sb_logo_printing set_nozzle_leds_on

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

[gcode_macro G32] gcode: status_calibrating_z BED_MESH_CLEAR G28 QUAD_GANTRY_LEVEL G28 status_off #####################################################################

START PRINT

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

[gcode_macro START_PRINT] variable_bed_temp:60 variable_extruder_temp: 210 gcode:

Start bed heating

M140 S{bed_temp}
# Use absolute coordinates
G90
BED_MESH_CLEAR
# Reset the G-Code Z offset (adjust Z offset if needed)
SET_GCODE_OFFSET Z=0.0
# Home the printer
G28
# DENGE DÜZELTME
QUAD_GANTRY_LEVEL
G28 Z

#NOZZLE CLEANING POSITION
G1 X357 Y10 Z10.0  F5000
# Wait for bed to QUAD_GANTRY_LEVELreach temperature
M190 S{bed_temp}
# Set and wait for nozzle to reach temperature
M109 S{extruder_temp}
# Reset Extruder
G92 E0
#FILAMENT CLEANING
G1 E20 F400
#NOZZLE CLEANING
CLEAN_NOZZLE
# Move Z Axis up
G1 X360 Y10 Z10.0 F3000
# Reset Extruder
G92 E0
# Move to start position
G1 X300 Y30 Z0.28 F5000.0
# Draw the first line
G1 X300 Y200.0 Z0.28 F1500 E20
# Move to side a little
G1 X303 Y200.0 Z0.28 F1500
# Draw the second line
G1 X303 Y30 Z0.28 F1500 E40
#POSITION READY
G1 X303 Y30 Z10 F5000
#SETUP_KAMP_MESHING DISPLAY_PARAMETERS=1
#BED_MESH_CLEAR
#BED_MESH_CALIBRATE
#PRINT START CENTER
G1 X160 Y155 Z10 F5000
# Reset Extruder
G92 E0
#Print message on LCD
#M117 TUTMAYIN KUCUK ENISTEYI.. YARDIRDIM GELIYOM :)
BED_MESH_PROFILE LOAD=default



[gcode_macro CLEAN_NOZZLE] variable_start_x: 360 variable_start_y: 20 variable_start_z: 0 variable_wipe_dist: 50 variable_wipe_qty: 10 variable_wipe_spd: 200 variable_raise_distance: 15

gcode: {% if "xyz" not in printer.toolhead.homed_axes %} G28 {% endif %} STOP_LED_EFFECTS

SET_LED_EFFECT EFFECT=sb_logo_cleaning

G90 ; absolute positioning

Move nozzle to start position

G1 X{start_x} Y{start_y} F6000 G1 Z{start_z} F1500

Wipe nozzle

{% for wipes in range(1, (wipe_qty + 1)) %} G1 Y{start_y + wipe_dist} F{wipe_spd 60} G1 Y{start_y} F{wipe_spd 60} {% endfor %}

Raise nozzle

G1 Z10 F1000 #Z{raise_distance}

STOP_LED_EFFECTS SET_LED_EFFECT EFFECT=rainbow

SAYGILARIMLA

BARBAROS DOĞANCI

Julian Schill @.***>, 10 Şub 2024 Cmt, 10:13 tarihinde şunu yazdı:

Delete the file ~/klipper/klippy/extras/led_effect.py and remove all your config entries. Additionally delete the folder ~/klipper-led_effects

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

burntcoinpurse commented 4 months ago

Completely un-readable on github lol. But I can read it in the email notification. Try commenting out the case light to see if that helps. You can also try condensing the leds i.e. "sb_leds (1-50)"

[led_effect sb_logo_heating] leds: neopixel:sb_leds (25-50) # (1,3,7,8,6,2,63,65,71,72,70,64) autostart: false frame_rate: 24 layers: chase 0.30 0.60 add (1.00,1.00,1.00),(0.0,0.0,0.0) #comet 0.3 0 add (1, 0.18, 0)

This could also be causing an issue

julianschill commented 4 months ago

The white flashes I have seen a few times and I think it's from an overload of the MCU. Unfortunately the neopixel control implementation in klipper is not very efficient and can get interrupted by e.g. motor stepping. This might cause these flashes. It helps to put all leds on a separate MCU (e.g. a Raspberry Pi Pico). For the nozzle cleaning I am not sure what you mean by not completing. The effects shouldn't have any influence on the movement of the printer.

bybarbaros commented 4 months ago

Let me try to explain. for example. Let's say when the print start macro starts. Let's assign an LED effect. hotend home did it all. qgl did it. He turned on the heaters. From here on it will start cleaning the nozzle. (In the meantime, I set a different led effect macro.) and while the nozzle cleaning started, the led effect macro changed. But before the cleaning macro is finished, the led effect returns to the first led effect macro I set. Can timing setting be added for led effect here? To make the runtime of the clean nozzle macro and the led effect macro the same. note: please excuse any spelling errors and misunderstandings. I use google taranslate. I often lose meaning in translating what I want to say and your answers.

julianschill commented 4 months ago

I can't see anything in your print_start that changes an effect. Maybe it's in your nozzle_clean macro?