Set GPIO high when gcode executed

Hi all. I’m a proud owner of the Lulzbot Mini 1. Been going strong for several years now. I’m planning a tasteful mod that I need a bit of help with. What I’m looking for is a GPIO pin that is exerted high when the printer is actively “working” on a job (parsing gcode), and low otherwise. I will be using the signal as an input to a custom lighting/fume extraction controller.

My first thought is to hijack a free/unused pin (PH2?) on the Rambo and set the state using modified Marlin firmware. It makes sense to tie it to gcode parsing, but I’m having difficult finding where the appropriate start and stop points in the code. Can anyone suggest where I should look in firmware?

Or maybe there is another workaround? Maybe there is already a GPIO that is doing something similar that I don’t know about?


While not exactly what you are looking for, the target temperature of the nozzle would be a pretty good indication of an active print job.

Thanks, that’s a pretty good suggestion! I might run with that for now.