Re: Help with CNC machine
Most decent motion controllers will work this way. Using pushbuttons is all about selecting a controller with enough I/O so that you can send or receive signals to and from what you need to control.
We supply and fit Cncdrive motion controllers on the Routers we build/sell that use UCCNC control software and all of the things you ask for above are easily done. You will just need to choose the controller model which provides the amount of I/O you need.
Re: Help with CNC machine
In terms of how to get the gcode permanently embedded -
What is the CNC machine connected to? Do you already have a breakout board and motion controller? This then needs to be connected to a PC or mini PC then the gcode can be stored on a USB stick and left in the PC to run the code. Same for the mini PCs. There are also standalone controllers which take USB drives containing the code and these don’t need a PC. I only ask the above as you only mention the machine and gcode. There are other bits needed to get it all going so your options depend on what you have now.
You also mention Arduino so I’m wondering if you plan to hook up this to the machine and embed the code there ? Or maybe GRBL ?
Also Nema 17 and Ender 3 comments make me wonder if this is a small machine like a 3D printer, rather than a heavy duty CNC machine?
You will get more specific advice if you can give a few more details on the project and ideally a photo of what you have.