Why not just use the reset button that's already there. I tapped into the board and ran a wire to my control panel and mounted a big red button there.
It stops the print immediately, whereas a G code command might not get run in time (or at all) depending on the state of the printer.