<indentfold>[tmc2130 stepper_x]
diag1_pin: ^!PA1 # TMC DIAG1
driver_SGT: -64  # 63
gcode:
  {% set target  = params.BED_TEMP|int %}
  {% set current = printer.heater_bed.temperature %}

  {% <beginfold id='1'>if</beginfold id='1'> current < target - 20 %}
    G4 P{ 5 * 60 * 1000 }       #Milliseconds to dwell
  {% else %}
    G4 P{ 1 * 60 * 1000 }
  {% <endfold id='1'>endif</endfold id='1'> %}
  G92 E0               # Reset Extruder
  G1 Z2.0 F3000        # Move Z Axis to travel height
  ACCEPT
[gcode_macro blink_led] ; comment
description: Blink my_led one time
gcode:
  SET_PIN PIN=my_led VALUE=1
  G4 P2000
  SET_PIN PIN=my_led VALUE=0
