Hi Charles,
As @PhilG said, GRBL would probably be the best starting point, and in fact it will do all the stepper motor control for you (it’s a lot of work to re-implemented all that). I will say this though: GRBL already pushed the ATMega328 microcontroller (the one in the Arduino Uno) to its extreme limits in terms of memory usage and realtime performance. I will not be easy to add any significant amount of your custom code in there without breaking something (the memory limit or the performance)
If you do this for the fun of learning how to control stepper motors from an Arduino, then by all means proceed down this path, it’s a great learning experience. However if you want to focus on developing your scanning jig, why not let GRBL and the Shapeoko controller board deal with the motion control, and just ue your Arduino Uno to control GRBL and the camera trigger?
It could work like this:
- Your arduino Uno would be connected to the Shapeoko over its USB serial interface (doable with a serial/USB adapter connected to the UART RX/TX pins of the Arduino Uno)
- It would send G-code commands to make the machine move to a given position
- It would then trigger the camera shutter via one of its GPIOs
- rince and repeat, for all positions in a grid over the area you want to scan.
If you do it this way, I think the effort to goes from months to a few days. But then again as I said, if the stepper control part is what you have fun implementing, that’s understandable too
I have had this “shapeoko scanner” idea on my todo list for a long while, so I’ll be quite interested to see what you come up with. Also I messed with using an extra Arduino and the Shapeoko in this project, though in that case the Arduino was only reading the output of a DRO, the scanning motion was predefined in a generated G-code file.