Klipper possible?

Here’s a klipper cfg file I posted a while ago. It contains macros for switching a relay on/off that is activated by a gpio pin. You would need to identify an unused gpio pin on the m8p board and provide the appropriate pin id. The following macros, TOOL_ON and TOOL_OFF can be placed in gcode files.

 [output_pin tool_power]
 # tool_power pin PA4 is located at J52, the 6th jumper down in the endstop block
 pin: PA4
 value: 0
 shutdown_value: 0
 pwm: false

[gcode_macro TOOL_ON]
gcode:
  SET_PIN PIN=tool_power VALUE=1

[gcode_macro TOOL_OFF]
gcode:
  SET_PIN PIN=tool_power VALUE=0

gcode:

;(Exported by FreeCAD)
;(Post Processor: klipper_post)
;(Output Time:2022-09-06 16:47:54.599671)
;(begin preamble)
;(begin operation: G54)
;(machine units: mm/min)
G0 Z31.400 
;(finish operation: G54)
;(begin operation: 1/8in Endmill001)
;(machine units: mm/min)
TOOL_ON 
;(finish operation: 1/8in Endmill001)
;(begin operation: DressupTag)
;(machine units: mm/min)
G0 Z31.400 
G0 X21.837 Y47.274 Z31.400 

https://forum.v1e.com/t/klipper-for-the-lr2/34005/12

3 Likes