I modified Marlin a bit to be able to use a laser engraving module. I just have the laser controlled by a simple mosfet circuit (controlled by an ATmega2560) and everything is working fine. The problem is that for some reason, the signal pin is written to 5V while I'm uploading firmware or connecting to the printer. Since writing high to the pin triggers the laser, I would like to avoid this. I added a few lines to the setup routine in Marlin_main to write the pin low on startup, but as far as I can tell it doesn't take effect until the printer is completely uploaded/connected, aka when the splash screen goes away.
I'm not sure what stage/function of the firmware controls this (or if it's even something the firmware can affect), so I guess I'm asking for an explanation of what goes on when the board is being uploaded to or when I connect a usb.
I'm not sure what stage/function of the firmware controls this (or if it's even something the firmware can affect), so I guess I'm asking for an explanation of what goes on when the board is being uploaded to or when I connect a usb.