Avisos
Vaciar todo
Way to detect print cancel/failure and send M150 gcode to change LEDs to red?
Hi everyone,
I have a MK3S+ and I love it. I built an RGB LED lighting rig and the mosfet situations necessary to drive it. They run off of 3 GPIO pins on the Raspberry Pi I have running Octoprint. Right now I have inserted M150 gcode into the start (white) and end (green) gcodes in PrusaSlicer, but I'd like to be able to detect a failed or cancelled print and change the RGBs to red.
Can anyone think of a good way to do that? I was thinking I could compare the layer_z placeholder to the max_layer_z placeholder to determine if the print finished, but then it occurred to me that the max_layer_z placeholder is probably the printer max z value.
Respondido : 27/11/2022 6:21 am