I'm coming back to the L298P . I can still only make it reliable in 10RPM. I decided to use the firmware instead of the test ino. motorSpeedDelay had no effect using the test ino. We'll see how it goes.
Moonlite treats the rotator motor as part of the focuser device. And I have seen a Nano controlled project using the Moonlite ASCOM driver. The Eleksmaker is a Nano controlled laser engraver so I think it is possible to control two steppers independently. Especially if I do not support any other devices. Perhaps to get a rotator going I will build a standalone rotator circuit first and use two com ports.
I have given up on using this shield. I did however find a compact driver board for the Nano that will support two stepper drivers. It came with A4988s and a Nano on it. It is called" Eleksmaker Mana SE" They are not sharing wiring or software details so it will be challenging to reverse engineer the product. My goal is to combine a focus controller with a rotator in one device.
I'm afraid that I'm having bad luck with this shield. Using your new test program I can get it reliably turning at 10,20,30 RPM. delay = 1 (only). When I try these settings in the Focuserv265 L298P firmware I get poor results. Lots of skippping until finally it stalls. Perhaps I'm not meant to minimize the space needed for this device.
I found that step_delay = (60L * 1000L * 1000L) / this->number_of_steps / whatSpeed; So I am glad you mentioned that the "delay" is just for local loop execution. However, I don't see any local loop in the Test code you provided. It just passes speed, direction, and step count to mystepper which is driving the motor. I believe that changing the value of motorSpeedDelay does nothing in this test code.
I found that step_delay = (60L * 1000L * 1000L) / this->number_of_steps / whatSpeed; So I am glad you mentioned that the "delay" is just for local loop execution. However, I don't see any local loop in the Test code you provided. It just passes speed, direction, and step count to mystepper which is driving the motor.
I cannot find anywhere in the ino code where "motorSpeedDelay" and "stepontime" are passed to myStepper.h . I think this is why changing those values have no effect whatsoever. I don't know enough about this syntax to pass the values properly.
When I got it working on "fast" I increased the steps per revolution gradually but I had to reduce the RPM accordingly. Finally at 5370 Steps Per Revolution I found that 10RPM provided smooth movement and full 360 degrees travel (no missed steps). No other RPM produced this result. Step On Time and Motor delay did not seem to make a noticeable effect. So I returned them to 5. I think I want a wider range of speeds right? Or does this test only find the optimal speed? Thanks, Kevin