I've been hacking away on an Arduino-based pendant which I am planning to document both as an open-source project and which I might offer PCBs for. This youtube video shows the current iteration of the prototype which includes all the typical pendant functions, plus some pretty cool stuff like an LCD with a 3D DRO display, all over a single USB cable.
[nomedia="http://www.youtube.com/watch?v=n9YMpQjsab4"]YouTube - Arduino EMC Pendant II[/nomedia]
Now, the catch with where I'm at right now is that it only works with EMC2. The reason for this is that the Arduino microprocessor communicates with the host PC using serial-over-USB, rather than native USB. There is a Python "driver" program which runs inside EMC that translates messages between EMC and the Arduino and vice-versa.
What I am curious about is how I might go about interfacing something like this with Mach. My understanding is that Mach does not natively support the serial port, but I am wondering if there is some kind of API I could use and write my own driver for. I am looking to keep this as simple as possible, largely to make it easier for end-users to hack their own hardware, and so I'd really like to keep the firmware the same regardless of the program the pendant is driving.
The simplest way I've thought to do this is to use hotkeys in Mach and then have the pendant trigger keypress actions on the host PC. I haven't tried this but know how to go about it. The only problem with this is that it only handles input from the pendant, and I'd really like to keep the output functions that work with EMC.
If anyone could point me towards some documentation or other materials on this I'd be very interested. I've gotten a lot of interest from the EMC folks on this project, and if I could make it work with Mach3 as well I think that'd be really cool. As it is, the prototype above is probably not more than $100 of hardware at retail prices, and I think a complete kit priced at $200 or less is very doable.
Also, I do know that the newest Arduino boards are capable of native USB, but this is new and it's not clear this would be easy for people to hack. I'm trying to preserve the simplicity of the architecture for end-users so that they can do their own mods without too much support or additional tools. The core Arduino toolset is really good for this.