Thanks for the welcome.
I have a router table and I wanted to automate setting the bit height to get accuracy. I also wanted to be able to quickly zero a new bit to the top of the table, This was over 3 years ago. Later I found out about grbl which would have done it for me but it was a learning experience so the time wasn’t wasted.
Here’s a link to a short video I shot.

https://youtu.be/-KZDtdFxnF0