The Shield is configured to 3.3V logic corresponding to the instellation guide.
I tested the shield with an Arduino uno R3 and it works fine before switching it to 3v and it still works fine with the 3v logic jumper connected. I tested my solder point and there is only a connection to the 3V pin and no connection to 5V (even though it looks like a mess).
The Program I'm using is the same for the uno and due and I'm out of Ideas how I can get the thing to work.
On the due I get the "error!" message over the serial monitor.
It is crusical for me to be using an due. An uno or uno wifi hasn't enough sram for my project.... sadly
This is the code I use:
Code: Select all
#include <AccelStepper.h>
#include <Adafruit_MotorShield.h>
Adafruit_MotorShield AFMS(0x60); // Default address, no jumpers
// Connect two steppers with 200 steps per revolution (1.8 degree)
// to the top shield
Adafruit_StepperMotor *myStepper = AFMS.getStepper(200, 1);
// you can change these to DOUBLE or INTERLEAVE or MICROSTEP!
// wrappers for the first motor!
void forwardstep1() {
myStepper->onestep(BACKWARD, SINGLE);
}
void backwardstep1() {
myStepper->onestep(FORWARD, SINGLE);
}
// Now we'll wrap the 3 steppers in an AccelStepper object
AccelStepper stepper(forwardstep1, backwardstep1);
void setup()
{
Serial.begin(9600);
Serial.println("Setup!");
if (!AFMS.begin())
{
Serial.println("error!");
}
stepper.setMaxSpeed(500.0);
stepper.setAcceleration(50.0);
stepper.moveTo(200);
}
void loop()
{
// Change direction at the limits
if (stepper.distanceToGo() == 0)
stepper.moveTo(-stepper.currentPosition());
stepper.run();
}