forked from viesturz/klipper-toolchanger
-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathtool-AVR1.cfg
131 lines (117 loc) · 3.14 KB
/
tool-AVR1.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 AVR1]
serial: /tmp/pseudoserial1
restart_method: arduino
[temperature_sensor AVR1_temp]
sensor_type: temperature_mcu
sensor_mcu: AVR1
[extruder1]
step_pin: AVR1:PB1
dir_pin: !AVR1:PB0
enable_pin: !AVR1:PD6
heater_pin: AVR1:PD5
sensor_pin: AVR1: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.4
pressure_advance_smooth_time: 0.01
[tmc2209 extruder1]
uart_pin: AVR0:PB7
interpolate: false
run_current: 0.6
sense_resistor: 0.110
stealthchop_threshold: 0
[fan_generic AVR1_partfan]
pin: AVR1:PB4
[heater_fan AVR1_hotend_fan]
pin: AVR1:PB5
heater: extruder1
heater_temp: 50.0
kick_start_time: 0.5
[tool AVR1]
tool_number: 1
extruder: extruder1
fan: fan_generic AVR1_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: 102.4
params_input_shaper_type_x: 'zv'
params_input_shaper_freq_y: 20.6
params_input_shaper_type_y: 'zv'
# Change tool number if needed
[tool_probe AVR1]
pin: AVR1:PB6
tool: 1
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=extruder1 TEMP=150
[adxl345 AVR1]
cs_pin: AVR1:PC4
spi_software_sclk_pin: AVR1:PC0
spi_software_mosi_pin: AVR1:PC1
spi_software_miso_pin: AVR1:PC2
axes_map: x,z,y
[filament_switch_sensor filament_sensor_AVR1]
switch_pin: AVR1:PC3
pause_on_runout: FALSE
runout_gcode:
M117 Runout sensor AVR1 reports: Runout
SET_GCODE_VARIABLE MACRO=AVR1 VARIABLE=filament_consumed VALUE=1
insert_gcode:
M117 Runout sensor AVR1 reports: Filament Detected
SET_GCODE_VARIABLE MACRO=AVR1 VARIABLE=filament_consumed VALUE=0
[gcode_macro AVR1]
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=AVR1 VARIABLE=active VALUE=1
ACTIVATE_EXTRUDER EXTRUDER=extruder1
SELECT_TOOL T=1
{% endif %}
[gcode_macro T1]
variable_realtool: "AVR1"
variable_backuptool: ""
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 %}