I wrote up a quick library that will get steppers running on your Arduino Due with the fantastic Adafruit motor shield. Right now I've only got interleave stepping incorporated; in the future I plan on adding options for acceleration and possibly other features for those that want. The library isn't as pretty as the Adafruit one (agh I don't know how to do bitwise manipulations! :cry: ). However, this should get people going until someone comes out with a more complete library.

Just download the zip (below), open the Arduino IDE, click on Sketch --> Import Library... and select the downloaded zip! I even included a little example for you all to play with :)

I wrote up a quick library that will get steppers running on your Arduino Due with the fantastic Adafruit motor shield. Right now I've only got interleave stepping incorporated; in the future I plan on adding options for acceleration and possibly other features for those that want. The library isn't as pretty as the Adafruit one (agh I don't know how to do bitwise manipulations! :cry: ). However, this should get people going until someone comes out with a more complete library.

Just download the zip (below), open the Arduino IDE, click on Sketch --> Import Library... and select the downloaded zip! I even included a little example for you all to play with :)

However when I made a few adjustments in compiled fine and loaded with no errors. Not sure what the difference is as I'm new to programming and sourced a few different places for stepper codes. Let me know if anyone can figure out what the deal is? lol.

// Example code to get a stepper to run on the Adafruit motorshield// Send any questions to Constantino: constantino@photocs.net// http://www.photocs.net

#include <Stepper.h>const int stepsPerRevolution = 200;long timeDelay = 900; // this variable controls speed; its the time (in microseconds) since the last step after which another step should occur. adjust to the specs of your stepperboolean dir = false; // controls the direction of spinStepper motor (stepsPerRevolution, 8,9,10,11);

void setup() { Serial.begin(9600); Serial.println("Yay steppers work on the Due!"); motor.setSpeed(60); // get the motor ready}

This error is telling you that the library has no constructor that takes a single int argument, but that there are constructors that take 5 ints, or 3 ints, or a reference to another Stepper object.

But titous's library only has the single constructor taking a single int. So, you aren't actually using his library.

yep, you aren't using my library, you are using the standard Stepper library which was written for boards like the Uno... I should probably have named it something else, then again this library doesn't exist for the Due. Good luck!

titous wrote:yep, you aren't using my library, you are using the standard Stepper library which was written for boards like the Uno... I should probably have named it something else, then again this library doesn't exist for the Due. Good luck!

Oh, duh. I see that in your post now that it's for the Due and yes I am using the UnoR3 with the Stepper Library installed. That makes sense. Great code and I wish I had the Due to try it out, I'd still love to include it in the Motor Shield manual, If that's ok?

No. No that is not what I meant at all. I thought that the general context of the thread would make it quite clear, but I guess I was wrong. What I meant was: "Has anyone made a similar library for regular dc motor driving with the v2.0 board? Or does it just work with the due?"

The latter I have already found to be false. It doesn't just work with the due.So does anyone have an answer to the former?

I guess I COULD try to make one, but being a highschooler during finals week I doubt I would have the time or strength to learn all the low level coding that would be necessary to do it.

The V2 motor shield and the Adafruit_MotorShield library should work with the Due. I haven't tried it, but the code is written to work with the Due, and the shield itself is compatible.What problems are you seeing?