How to deconstruct GCodes to control my robotic arm?