February 15, 2024
Description
Buttons that fits in Voron's hexagonal skirt holes.
12x12mm through hole buttons are used. I think I used these. Connect them to free GPIO pins. The Raspberry Pi usually have a few free ones if the control board is maxed out. One cable to the I/O-pin, one to ground and use a pull-up configuration in Klipper (use ^! before the pin-name in the pin: config line).
Printed in PLA with 0.2mm layer height, 0.4mm nozzle. 18% infill. No supports.
The quick and dirty onshape model can be found here.
See here and here for the description on how to configure Klipper.
I use this for the light button:[gcode_button BUTTON_LAMP]pin: ^!rpi:gpio4press_gcode: {% if printer['output_pin caselight'].value == 0 %} LED_ON {% else %} LED_OFF {% endif %}
Update to the pin where your light button is connected, “caselight” to the output pin you use to control the light and change LED_ON/LED_OFF to whatever macro you use to turn on/off the lights.
I've configured Klipper so I need to hold down the filament button down to run the extruder and if I first double click, it unloads instead. The button shouldn't work while my filament sensor is active (which it is during printing). Update temperatures, filament sensor name and pin as needed.
[delayed_gcode feed_load]
initial_duration: 0
gcode:
UPDATE_DELAYED_GCODE ID=feed_load DURATION=0.2
{% if printer[printer.toolhead.extruder].temperature >= 180 %}
SAVE_GCODE_STATE NAME=__filament__load
M83
G0 F240 # 240mm/min = 4mm/s
G1 E0.8 # 0.8 * 5 = 4mm
RESTORE_GCODE_STATE NAME=__filament__load
{% else %}
BEEP freq=100 dur=100
{% endif %}
[delayed_gcode feed_unload]
initial_duration: 0
gcode:
UPDATE_DELAYED_GCODE ID=feed_unload DURATION=0.2
{% if printer[printer.toolhead.extruder].temperature >= 180 %}
SAVE_GCODE_STATE NAME=__filament__unload
M83
G0 F240 # 240mm/min = 4mm/s
G1 E-0.8
RESTORE_GCODE_STATE NAME=__filament__unload
{% else %}
BEEP freq=100 dur=100
{% endif %}
[delayed_gcode button_feed_double_click_check]
initial_duration: 0
gcode:
SET_GCODE_VARIABLE MACRO=_BUTTON_FEED_CLICK VARIABLE=double_click VALUE=0
[gcode_macro _BUTTON_FEED_CLICK]
variable_double_click: 0
gcode:
SET_GCODE_VARIABLE MACRO=_BUTTON_FEED_CLICK VARIABLE=double_click VALUE={ double_click + 1 }
UPDATE_DELAYED_GCODE ID=button_feed_double_click_check DURATION=0.5
{% if printer['filament_switch_sensor filament_sensor'].enabled %}
BEEP freq=100 dur=150
{% else %}
{% if double_click == 0 %}
M117 Loading...
UPDATE_DELAYED_GCODE ID=feed_load DURATION=0.5
UPDATE_DELAYED_GCODE ID=feed_unload DURATION=0
{% else %}
M117 Unloading...
UPDATE_DELAYED_GCODE ID=feed_load DURATION=0
UPDATE_DELAYED_GCODE ID=feed_unload DURATION=0.5
{% endif %}
{% endif %}
[gcode_button BUTTON_FEED]
pin: ^!rpi:gpio22
press_gcode:
_BUTTON_FEED_CLICK
release_gcode:
UPDATE_DELAYED_GCODE ID=feed_load DURATION=0
UPDATE_DELAYED_GCODE ID=feed_unload DURATION=0
{% if printer['pause_resume'].is_paused|int == 0 %}
M117 Ready
{% else %}
M117 Paused
{% endif %}
License:
BSD License
7