This Project has codes that may cnc controller possible. My cnc has 2 mechanical axis. I am monitoring through switches the axis limits. For this i use the library rtos. Enjoy.

Dependencies:   mbed-rtos mbed

Revision:
1:ef18c260ce02
Parent:
0:7cedfb720712
--- a/EixoMonitoring.h	Wed Jun 07 13:31:02 2017 +0000
+++ b/EixoMonitoring.h	Mon Sep 18 13:05:47 2017 +0000
@@ -11,8 +11,8 @@
 class EixoMonitoring {
     
     public:
-             int    delayTimer; 
-             int    hitSensor;
+       int    delayTimer; 
+       int    hitSensor;
        Debug* debug;