I'm working on a new project that should lead to several big improvements to TinyG for Android. The project overall is to build a simple "operator" control for an existing CNC system, which would be able to send a stored program to a TinyG when the "go" button is pressed. For this to work correctly, the unit will need to be able to home the CNC system on reset. It will also need to be able to handle a few additional control inputs/outputs, since in addition to the "standard" gcode-based axes and spindle controls, the unit requires the actuation of some relays.
The Android app comes into play as a programming and control pendant for the operator unit. The idea here is to have the Android device be able to train/build a new program by providing step-by-step line, arc, and relay controls, and then to have these programs be able to be stored on the Android device and uploaded to the operator system as needed. During the program mode, the operator control would act like a passthrough.
There are two reusable components that will come out of this project that are of general interest. The first is the program builder. The second and in some ways the most important is that I will be implementing the operator control as an Android Accessory. This will require a shim device between the TinyG and the Android devices (unlike the current Host mode), but has the potential to open the application up to many more Android devices. While my first cut will only support Android 3.1 and up, a compatibility library should allow support to even earlier devices.
I'm planning to use the Arduino ADK board as the core of the operator control. It is in effect an integrated Arduino Mega 2560 and a USB shield. The Arduino programming environment is kind of clunky, but I expect that it will be sufficient for this project. I probably could have used an Arduino UNO for this project, but the Mega's additional hardware serial ports and additional IOs make it an attractive option. I'll be combining the ADK board with at least a microSD card breakout to store the programs. The relay integration is TBD. Depending on the switching voltages, I may use a relay shield or a standalone relay module.
At the moment I'm just sketching out the design and gathering materials. I will be documenting progress as I go, including some photos.
In other news, I picked up a Xilinx CPLD development board, and I'm looking forward to learning a bit more about Verilog and CPLD/FPGA programming. Given the TinyG project, it will probably need to wait for a while. Lots of fun toys!