Hi guys,
I have made a two axis linear slides using stepper motor. I'm using a4988 driver.
My question is:
If I move from (0, 0) to (400, 400), both stepper motors move at a constant speed, and reaches (400, 400). Great.
If I move from (0, 0) to (400, 100), then I need to increase the speed of one of the stepper motors by 4 times fine.
But if I move from (0,0) to say (431,89), then I need to increase the speed of one of the motor by 4.84 times. But stepper.serSpeed() won't take values in integer.
Thank you!!
Another approach would be to use GRBL to generate the pulses. GRBL is free to download and runs on Uno, can drive 3 independent steppers for XYZ axes. It incorporates interpolation (probably Bresenham). Takes g-code input, so you would send it
G01 X431 Y89 F100
to move from current position to (431,89).
GRBL widely used in DIY CNC machinery, nice program.
for instructions on downloading and installing. Once installed you can send it g-code commands from the serial monitor command line or a number of g-code senders.