I'm trying to run stepper CW then CCW but it resets before CCW command.
I've read esp8266 needs to call wifi a lot, but I don't understand how that affects this.
Error message below
⸮clockwise
Soft WDT reset
stack>>>
ctx: cont
sp: 3ffffde0 end: 3fffffc0 offset: 01b0
3fffff90: 3fffdad0 3ffee270 3ffee228 40201073
3fffffa0: feefeffe 00000000 3ffee298 40201c04
3fffffb0: feefeffe feefeffe 3ffe84f4 401004e9
<<<stack<<<
#include <Stepper.h>
// Define number of steps per rotation:
const int stepsPerRevolution = 2048;
// Wiring:
// Pin 8 16 to IN1 on the ULN2003 driver
// Pin 9 5 to IN2 on the ULN2003 driver
// Pin 10 4 to IN3 on the ULN2003 driver
// Pin 11 0 to IN4 on the ULN2003 driver
// Create stepper object called 'myStepper', note the pin order:
Stepper myStepper = Stepper(stepsPerRevolution, 16, 4, 5, 0);
void setup() {
// Set the speed to 5 rpm:
myStepper.setSpeed(10);
// Begin Serial communication at a baud rate of 9600:
Serial.begin(9600);
}
void loop() {
// Step one revolution in one direction:
Serial.println("clockwise");
myStepper.step(stepsPerRevolution);
delay(500);
// Step one revolution in the other direction:
Serial.println("counterclockwise");
myStepper.step(-stepsPerRevolution);
delay(500);
}
