Marlin customization; additional output after G0/G1 move This question concerns an Anet A8 with customized Marlin Firmware 1.1.9.

I need to generate an additional digital output to signal move complete to trigger some data acquisition process. The extruder is not connected and was planning to use those outputs.

Which section handles G-code processing and is there an already available option to get the job done?

Basically, I'm trying to use the Anet A8 as a computer-controlled positioning system. It involves some other elements which need to be triggered in a stationary state. The requirement is: G0 X10 Y10 after this is complete: set a pin high and low after a 10&nbsp;ms delay. this after every move. Additionally if I could add my own G-code to preserve the original operation would be ideal.
Which section handles G-code processing?


In Marlin Firmware, G-code is processed by procedure void process_parsed_command() in file Marlin_main.cpp


  I need to generate an additional digital output


A G-code that is able to set a port value is M42.

You could write a procedure that schedules  certain port after a G0 or G1 move, recompile and upload the firmware.