Sharing code, 1 trigger, 3 functions
-
It's common for me to home, tram, tram, maybe tram again, then home-Z. I wanted a simple way to do it, so I started designing an electromechanical control panel. For now I just have added a handheld microswitch connected to io1 on the 6HC to accomplish all 3 of those tasks.
P.S. my switch is NC, but I have it inverted so my check value is zero instead of one.
- tap - Home All
- tap, tap-hold x 1sec - Tram
- tap, tap-hold x 2sec - Home-Z
var button_pressed = sensors.gpIn[22].value M581 P-1 T22 G4 P500 var button_still_pressed = sensors.gpIn[22].value if { var.button_still_pressed == 0 } G4 S1 set var.button_still_pressed = sensors.gpIn[22].value if { var.button_still_pressed == 0 } G28 Z G4 S1 M581 T22 P22 else G32 G4 S1 M581 T22 P22 else G28 G4 S1 M581 T22 P22
-
@gnydick Nice idea
It could easily be adapted to- pause print
- cancel print
- shutdown power
Just wondering, if it could also debounce the pushbutton for the first usecase