<font face="Arial, Verdana">You can use</font>
<font face="Arial, Verdana">#define STARTUP_GCODE "G28"</font>
<font face="Arial, Verdana">
</font>
<font face="Arial, Verdana">to do this. But there is a problem with most printers. Most start firmware as soon as 5V from usb is available as that starts the processor and thus firmware. So if you then enable main power the move is already executed without action. There is no chance to see when main power is enabled. So for this to work you need to modify the board such that it ONLY powers the board from main power and not from USB. This can be done for several boards but is not default.</font>