I've build a CNC machine using an Arduino UNO a micro step driver (DM556) and few rotary step motors. I'm using GRBL motion control on Arduino and Universal-G-Code-Sender on my laptop to control the machine.
While this works fine, sometimes, the motors get stuck or are not able perform the requested action. I thus want to include a feedback loop telling me how many steps where actually performed. I've read multiple tutorials on rotary encoders and was able to build a prototype reading the number of steps performed by each motor.
Now, I don't know how to use this information to correct the position of the motors. It's probably a naive question, but I don't know whether the feedback should be handled by Arduino or the G-Code Sender on my laptop. Is there any software that, having the feedback information, can handle this automatically or I must implement it myself?