Seriously, bypass the arduino/pi business, the cut down G-Code instruction set is a right hash-up and results in something you think is fine but that anyone with a decent controller wouldn't even consider.