- [gcode_macro ARM_INSTALL]
- gcode:
- SET_PIN PIN=servo_power VALUE=1 # Power on servo via relay switch
- SET_SERVO SERVO=extruder ANGLE=90 # Set servo position to 90 degrees
- [gcode_macro SERVO_OFF]
- gcode:
- SET_PIN PIN=servo_power VALUE=0 # Power down servo via relay switch
- [gcode_macro ARM_POSITION]
- gcode:
- SET_PIN PIN=servo_power VALUE=1 # Power on servo via relay switch
- {% set serv_angle=params.A|default(0)|float %}
- SET_SERVO SERVO=extruder ANGLE={ serv_angle } # Move servo arm
- G4 P1500 # Allow time to make move
- SET_PIN PIN=servo_power VALUE=0 # Power down servo via relay switch
- [gcode_macro T0]
- gcode:
- {% set svv = printer.save_variables.variables %} # Set svv to point to variable.cfg
- ARM_POSITION A={svv.left_ang} # Switch to T0
- {% if "xyz" in printer.toolhead.homed_axes %}
- SET_GCODE_OFFSET X=0
- SET_GCODE_OFFSET Y=0
- {% endif %}
- ACTIVATE_EXTRUDER EXTRUDER=extruder
- G4 P2500
- [gcode_macro T1]
- gcode:
- {% set svv = printer.save_variables.variables %} # Set svv to point to variable.cfg
- ARM_POSITION A={svv.right_ang} # Switch to T1
- {% if "xyz" in printer.toolhead.homed_axes %}
- SET_GCODE_OFFSET X={svv.x_off} # Account for different X offset
- SET_GCODE_OFFSET Y={svv.y_off} # Account for different X offset
- {% endif %}
- ACTIVATE_EXTRUDER EXTRUDER=extruder1
- G4 P2500
[text] Klipper Switching Macros
Viewer
*** This page was generated with the meta tag "noindex, nofollow". This happened because you selected this option before saving or the system detected it as spam. This means that this page will never get into the search engines and the search bot will not crawl it. There is nothing to worry about, you can still share it with anyone.
Editor
You can edit this paste and save as new: