Skip to content

Instantly share code, notes, and snippets.

@wbatty
Created April 12, 2022 18:02
Show Gist options
  • Save wbatty/50c28f176c75b650f40724894f54b5b4 to your computer and use it in GitHub Desktop.
Save wbatty/50c28f176c75b650f40724894f54b5b4 to your computer and use it in GitHub Desktop.
[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 %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment