I want to develop a simple C# application to control a self-made CNC machine using Arduino Uno. I want to use G-code to accomplish that. Now what I don't understand is how G-code is interpreted in Arduino? and how does it determine at which pin (GPIO) I set the spindle motor for example, or any other motor? I am sure that my understanding of the G-code working process is not very good, and here where I add the question: are there standards that force me to choose specific pins to control the CNC motors? or the G-code interpreter itself determines the pins in which the motors are set at? Thanks in advance..
closed as too broad by clabacchio♦ Dec 27 '18 at 14:40
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
G code only knows the axis that you are commanding. The interpreter (which you should list but did not) then takes the G code commands and translates them to Motor commands. In the general style of Arduino, there is usually some sets of #defines that will set the pin assignments. Something like