Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update config_DU_V2.cfg #2

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 0 additions & 112 deletions config_DU_V2.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -217,21 +217,6 @@ contrast: 63
encoder_pins: ^EXP2_3, ^EXP2_5
click_pin: ^!EXP1_2

[neopixel fysetc_mini12864]
pin: EXP1_6
chain_count: 3
color_order: RGB
initial_RED: 1
initial_GREEN: 1
initial_BLUE: 1

[delayed_gcode setdisplayneopixel]
initial_duration: 1
gcode:
SET_LED LED=fysetc_mini12864 RED=1 GREEN=0 BLUE=1 INDEX=1 TRANSMIT=0
SET_LED LED=fysetc_mini12864 RED=1 GREEN=0 BLUE=1 INDEX=2 TRANSMIT=0
SET_LED LED=fysetc_mini12864 RED=1 GREEN=0 BLUE=1 INDEX=3

[output_pin beeper]
pin: EXP1_1

Expand All @@ -247,107 +232,10 @@ serial: /dev/ttyUSB0 #change for your USB port
[static_digital_output disable_sdcard]
pins: PB0

########################################
# G-CODE Settings & EVENTS
########################################
[include timelapse.cfg] #the elements (macros) included between "[ ]" must be deposited in the configuration file of klipper

[include neopixel.cfg] #the elements (macros) included between "[ ]" must be deposited in the configuration file of klipper

[include filament.cfg] #the elements (macros) included between "[ ]" must be deposited in the configuration file of klipper

[include fans.cfg] #the elements (macros) included between "[ ]" must be deposited in the configuration file of klipper

[include mainsail.cfg] # necessary for mainsail config


[virtual_sdcard]
path: ~/printer_data/gcodes #for mainsail config
on_error_gcode: CANCEL_PRINT

[display_status]

[pause_resume]

[gcode_macro PAUSE]
description: Pause the actual running print
rename_existing: PAUSE_BASE
# change this if you need more or less extrusion
variable_extrude: 1.0
gcode:
##### read E from pause macro #####
{% set E = printer["gcode_macro PAUSE"].extrude|float %}
##### set park positon for x and y #####
# default is your max posion from your printer.cfg
{% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
{% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
##### calculate save lift position #####
{% set max_z = printer.toolhead.axis_maximum.z|float %}
{% set act_z = printer.toolhead.position.z|float %}
{% if act_z < (max_z - 2.0) %}
{% set z_safe = 2.0 %}
{% else %}
{% set z_safe = max_z - act_z %}
{% endif %}
##### end of definitions #####
PAUSE_BASE
G91
{% if printer.extruder.can_extrude|lower == 'true' %}
G1 E-{E} F2100
{% else %}
{action_respond_info("Extruder not hot enough")}
{% endif %}
{% if "xyz" in printer.toolhead.homed_axes %}
G1 Z{z_safe} F900
G90
G1 X{x_park} Y{y_park} F6000
{% else %}
{action_respond_info("Printer not homed")}
{% endif %}

[gcode_macro END_PRINT] #adapt to your printer or in your slicer
gcode:
# Turn off bed, extruder, and fan
M140 S0
M104 S0
M106 S0
# Move nozzle away from print while retracting
G91
G1 X-2 Y-2 E-3 F300
# Raise nozzle by 10mm
G1 Z10 F3000
G90
# Disable steppers
M84

[gcode_macro CANCEL_PRINT]
description: Cancel the actual running print
rename_existing: CANCEL_PRINT_BASE
gcode:
TURN_OFF_HEATERS
{% if "xyz" in printer.toolhead.homed_axes %}
G91
G1 Z4.5 F300
G90
{% else %}
{action_respond_info("Printer not homed")}
{% endif %}
G28 X Y
{% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
G1 Y{y_park} F2000
M84
CANCEL_PRINT_BASE

# [mcu rpi]
# serial: /tmp/klipper_host_mcu

# [adxl345]
# cs_pin: rpi:None
# spi_speed: 2000000
# spi_bus: spidev2.0

# [resonance_tester]
# accel_chip: adxl345
# accel_per_hz: 70
# probe_points:
# 150,150,10