LOL, my coding is FAR from elegant but I get by and it works for me. Karl, if you want to post the code then I’m ok with it but I’m sure more experienced coders will find flaws so I don’t want to hear about them:) Just fix them please:)
The center circle function calculates center x,y point given 3 points around the circumference and then moves the tool to center x,y and sets that x,y point to origin. There were plans to code center ellipse and center rectangle/square functions as well as zero/touchplate for z axis but like Jeff, I tend to move on to the next project before completing the current one. The display updates x,y,z position every time the stick movement is idle. This is done by parsing a response from an M114 call to the Mega board as Karl mentioned.
The total cost for parts is around $10 or so if you order from Ebay(China).
The OLED display uses the U8G library and I haven’t examined the U8G code but i’m pretty certain that it uses interrupts because it tends to interfere with stepper timing when the display refreshes which is why I avoid refreshing the display during jogging.
@Jeff: If you aren’t planning to do any 3d printing then you should consider a USB motion control board along with a windows 10 tablet running mach3. The cost wouldn’t be much more than a raspberry Pi set-up but you’d have a dedicated touchscreen interface running Mach3 with USB camera support as well as probing/point cloud generation , MPG pendant support, and a host of other cool features. Mach3 also supports vbscripting to create custom macros that can be triggered by a button on the keyboard or pendant and also supports customized display templates.