So I recently built a small CNC with a few old unipolar steppers and wired it up with ULN2003 darlington arrays to step up my i/o signals to 12 volts. I have been trying to decide whether to use my Arduino Mega (GRBL) or LinuxCNC to control my machine. Then it hit me: why not use both! A standard setup of LinuxCNC sends out simple step and direction pulses from a paralell port, not the actual phase sequence that I need to drive my steppers (I know the software can be setup to produce phase sequences, but it is a fairly advanced task for a beginner like me). So what I want to do is feed the outputs from my paralell port to input pins on my Arduino. The Arduino would then interpret these step and direction signals and convert them into the phase sequence to be sent to the darlington arrays.
So my question:
a). Has anyone already written an arduino sketch capable of accomplishing a task like this? Would you be willing to share it?
b). Does anyone have any suggestions as to how I should go about writing this sketch myself?
Any thoughts or suggestions would be great!