Skip to content

Instantly share code, notes, and snippets.

@wbatty
Created April 12, 2022 18:02
Show Gist options
  • Select an option

  • Save wbatty/50c28f176c75b650f40724894f54b5b4 to your computer and use it in GitHub Desktop.

Select an option

Save wbatty/50c28f176c75b650f40724894f54b5b4 to your computer and use it in GitHub Desktop.

Revisions

  1. wbatty created this gist Apr 12, 2022.
    7 changes: 7 additions & 0 deletions toggle_lights
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    [gcode_macro TOGGLE_LIGHTS]
    gcode:
    {% if printer['output_pin caselight'].value %}
    SET_PIN PIN=caselight VALUE=0
    {% else %}
    SET_PIN PIN=caselight VALUE=1
    {% endif %}