So we've been building a CoreXY based cnc drill and we have modified a code we found on the internet for our own project. Our assignment is that we put in three coordinates and let the machine do the drilling on those coordinates. So what I want to know is, where do I put in my coordinates in this code?
And the code in loop() for receiving characters isn't any easier to follow.
However, assuming it works there is no need to fix it. You just need to know how the input data is specified.
If you do need to change your code have a look at the second example in Serial Input Basics which was written in the hope that it could be understood. The system in the 3rd example would more robust.
This returns the value of a floating point number represented in the serial input buffer, immediately following the letter specified by the call argument ('X', 'Y' or 'Z').