How toggle caselight pin?
[menu __main __1]
type: command
enable: {'output_pin caselight' in printer}
name: Lights
gcode:
SET_PIN PIN=caselight VALUE=1
{ menu.exit() }
How toggle caselight pin?
[menu __main __1]
type: command
enable: {'output_pin caselight' in printer}
name: Lights
gcode:
SET_PIN PIN=caselight VALUE=1
{ menu.exit() }
Try something like
type: input
name: Lights
input: { printer['output_pin caselight'].value | int }
input_min: 0
input_max: 1
input_step: 1
realtime: True
gcode:
SET_PIN PIN=frame_lighting VALUE={ menu.input | int }
Toggle caselight pin on menu click
[menu __main __1]
type: command
enable: {'output_pin caselight' in printer}
name: Lights: {'OFF ' if printer['output_pin caselight'].value else 'ON'}
gcode:
SET_PIN PIN=caselight VALUE={0 if printer['output_pin caselight'].value else 1 }
{ menu.exit() }