Which (if any) stepper libraries work with the R4 Wifi?

I've been working with an R3 developing a guitar pickup winder. Basically the Arduino accurately controls how thin copper wire is laid down for guitar pickups. I used the CNC Shield V3 and two stepper motors. Worked out the code and it was OK.

This has been fine but the R4 is faster, has more memory (I have an LCD display with lots of options and am now on the edge with memory).

So I got an R4 and immediately have found a number of issues, the keypad library doesn't work without a fix, done that. However the big one is the AccelStepper library which doesn't work. Further digging found

And the AccelStepper is listed as not working .

So I looked at the Stepper library, but I can't get the motor to turn reliably and the docs are a little light and it doesn't really appear to be well supported.

Looking through the forums and I can't see many topics about the R4 and stepper motors. So either nobody is using them OR other people aren't having any problems.

Can anybody recommend a documented arduino library that works with an R4 and a CNC Shield V3 please? A simple example program to validate that it works would be a bonus.
I've loads of code written and am happy to update but I have idea which libraries if any work.

All suggestions welcomed.

Thanks

Rob

I've got a library that is specific for R4 using A4988 drivers but it's kind of specific to the situation it was written for. I wrote it for a robot I was building because nothing else worked. But it only does speed and acceleration because that was all I needed. It will report position but it doesn't have like a runToPosition function or anything. That could be added real easy I think if you want. Feel free to fork it and add whatever. Let me know when you're done and I'll pull your changes back in if they're good.

Thanks for this.

My needs are actually quite simple, I need two stepper motors such that for every 360 degree rotation (at whatever speed that may be), I move another stepper motor a very small number of steps, basically the width of a piece of thin copper wire.

There's some complex maths for the more esoteric windings but thats it. I'll have a look at the rep and and see if it works.

Thanks for taking the time to respond.

best wishes

Rob

The MobaTools library works with the R4 WiFi. There is even an example where the stepper is controlled via Web.
MobaTools can be installed via the library manager.

Didn't know MobaTools was working for the R4. Good deal. That's probably a better choice for something like this project. The one I posted is pretty specific to a certain use case.

Thanks for this. Will check it out.

Appreciate the helpful and fast responses.

Rob

Just to let you know, I got the MobaTools library working via WiFi (which was a bit of a surprise to be honest, all I was after was getting motors to work. I have all the code for an LCD display)

Great relief to see motors spinning fopr the first time on the R4 board. Looks like it can drive the motors at quite high speed as well. Now to properly read the docs as opposed to guessing it all.

Thanks again for the pointers to MobaTools.

Rob

Thank you for your feedback. :+1:
If you have any questions about the documentation and functionality, please feel free to ask. It may also help to improve the documentation. :wink: .

1 Like