Open BenjaminZimbal opened 4 years ago
I ve the same issu. I am using a Nema 17 stepper motor with L298N driver board and a WeMos D1. I think it has to do with the delays you are using. (lag of yield();) But I am unsure about that. My code is far more complex but this code does work for me. Try it:
// Include the Arduino Stepper Library
#include <Stepper.h>
// Number of steps per output rotation
const int stepsPerRevolution = 400;
// Create Instance of Stepper library
Stepper myStepper(stepsPerRevolution, 15, 13, 12, 14);
void setup()
{
// set the speed at 60 rpm:
myStepper.setSpeed(60);
Serial.begin(9600);
}
void loop()
{
Serial.println("clockwise");
myStepper.step(stepsPerRevolution);
}
This has been fixed by #13
Hey there!
I am currently using a WEMOS D1 mini together with a 4-Pin stepper motor. It works correctly but after turning it, the esp runs through a software reset.
The Exception Decoder says the following:
My code looks like this:
The stepper motor is connected as follows: IN1 -> D4 IN2 -> D3 IN3 -> D2 IN4 -> D1
As I said, it works and rotates but after its done my esp resets :/
Also I couldn't find any issue in the Stepper.cpp/Stepper.h (for my low experience level with C++).
EDIT: I tried using only the stepper motor without any NTP or anything else, it keeps resetting.