forked from DraftShift/klipper-toolchanger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtool-AVR0.cfg
131 lines (117 loc) · 3.14 KB
/
tool-AVR0.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# This file contains example pin mappings for testing with the
# "simulavr" program. To use this config, compile the firmware for an
# AVR atmega644p, enable "low-level configuration options", and enable
# "simulavr software emulation". Further details are in
# docs/Debugging.md.
# See docs/Config_Reference.md for a description of parameters.
# AVR atmega644p Pins:
# PA0, PA1, PA2, PA3, PA4, PA5, PA6, PA7
# PB0, PB1, PB2, PB3, PB4, PB5, PB6, PB7
# PC0, PC1, PC2, PC3, PC4, PC5, PC6, PC7
# PD0, PD1, PD2, PD3, PD4, PD5, PD6, PD7
[mcu AVR0]
serial: /tmp/pseudoserial0
restart_method: arduino
[temperature_sensor AVR0_temp]
sensor_type: temperature_mcu
sensor_mcu: AVR0
[extruder]
step_pin: AVR0:PB1
dir_pin: !AVR0:PB0
enable_pin: !AVR0:PD6
heater_pin: AVR0:PD5
sensor_pin: AVR0:PA7
sensor_type: EPCOS 100K B57560G104F
control: watermark
microsteps: 16
rotation_distance: 33.683
nozzle_diameter: 0.400
filament_diameter: 1.750
min_temp: 0
max_temp: 250
min_extrude_temp: 50
max_extrude_only_distance: 50.0
pressure_advance: 0.1
pressure_advance_smooth_time: 0.01
[tmc2209 extruder]
uart_pin: AVR0:PB7
interpolate: false
run_current: 0.6
sense_resistor: 0.110
stealthchop_threshold: 0
[fan_generic AVR0_partfan]
pin: AVR0:PB4
[heater_fan AVR0_hotend_fan]
pin: AVR0:PB5
heater: extruder
heater_temp: 50.0
kick_start_time: 0.5
[tool AVR0]
tool_number: 0
extruder: extruder
fan: fan_generic AVR0_partfan
gcode_x_offset: 0
gcode_y_offset: 0
gcode_z_offset: 0
params_park_x: 28
params_park_y: 0
params_park_z: 200.0
params_close_y: 30.0
params_safe_y: 120.0
params_input_shaper_freq_x: 62.4
params_input_shaper_type_x: 'mzv'
params_input_shaper_freq_y: 88.6
params_input_shaper_type_y: 'mzv'
# Change tool number if needed
[tool_probe AVR0]
pin: !AVR0:PB6
tool: 0
z_offset: 0
speed: 5.0
samples: 3
samples_result: median
sample_retract_dist: 2.0
samples_tolerance: 0.02
samples_tolerance_retries: 3
activate_gcode:
_TAP_PROBE_ACTIVATE HEATER=extruder TEMP=150
[adxl345 AVR0]
cs_pin: AVR0:PC4
spi_software_sclk_pin: AVR0:PC0
spi_software_mosi_pin: AVR0:PC1
spi_software_miso_pin: AVR0:PC2
axes_map: x,z,y
[filament_switch_sensor filament_sensor_AVR0]
switch_pin: AVR0:PC3
pause_on_runout: FALSE
runout_gcode:
M117 Runout sensor AVR0 reports: Runout
SET_GCODE_VARIABLE MACRO=AVR0 VARIABLE=filament_consumed VALUE=1
insert_gcode:
M117 Runout sensor AVR0 reports: Filament Detected
SET_GCODE_VARIABLE MACRO=AVR0 VARIABLE=filament_consumed VALUE=0
[gcode_macro AVR0]
variable_active: 0
variable_filament_consumed: 0
gcode:
{% if printer.toolhead.homed_axes != "xyz" %}
{action_respond_info("Please home XYZ first")}
{% else %}
_TOOLCHANGER_DISABLE_FILAMENT_SENSORS
SET_GCODE_VARIABLE MACRO=AVR0 VARIABLE=active VALUE=1
ACTIVATE_EXTRUDER EXTRUDER=extruder
SELECT_TOOL T=0
{% endif %}
[gcode_macro T0]
variable_realtool: "AVR0"
variable_backuptool: "T1"
variable_color: ""
gcode:
{% set consumed = printer["gcode_macro " ~ realtool].filament_consumed|int %}
{% if consumed and backuptool %}
{ action_respond_info(realtool ~ " empty loading backup") }
{backuptool}
{% else %}
{ action_respond_info("Switching to " ~ realtool) }
{realtool}
{% endif %}