AF_Stepper motorA(48, 1);
void forwardstepA() { motorA.onestep(FORWARD, INTERLEAVE);}
void backwardstepA() { motorA.onestep(BACKWARD, INTERLEAVE);}
AccelStepper stepperA(forwardstepA, backwardstepA); // use functions to step
void setup()
{
// 20 pps
stepperA.setSpeed(20);
}
void loop()
{
stepperA.runSpeed();
}
AccelStepper (uint8_t interface=AccelStepper::FULL4WIRE, uint8_t pin1=2, uint8_t pin2=3, uint8_t pin3=4, uint8_t pin4=5, bool enable=true)
Hi, I use Arduino R3 and Motorshield Adafruit V1 with 2 x L293D (adafruit-motor-shield-V1).
Until now I used original AccelStepper v1.2. Worked quite well.
Trying last v1.5 it doesn't work any more, even with simple code like:
AF_Stepper motorA(48, 1);
void forwardstepA() { motorA.onestep(FORWARD, INTERLEAVE);}
void backwardstepA() { motorA.onestep(BACKWARD, INTERLEAVE);}
AccelStepper stepperA(forwardstepA, backwardstepA); // use functions to step
void setup()
{
// 20 pps
stepperA.setSpeed(20);
}
void loop()
{
stepperA.runSpeed();
}
With v1.2 I had 20pps, but with v1.51 I get like 1pps.
Do I miss something?
Or should I use the new class. If yes, how should I declare the L293D shield?What are pins and interface to set?
AccelStepper (uint8_t interface=AccelStepper::FULL4WIRE, uint8_t pin1=2, uint8_t pin2=3, uint8_t pin3=4, uint8_t pin4=5, bool enable=true)
--
You received this message because you are subscribed to the Google Groups "accelstepper" group.
To unsubscribe from this group and stop receiving emails from it, send an email to accelstepper...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.