So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By Heiniketh
#87259 Yeah the problem is definitely not a hardware issue. The Motor runs fine with the same code on an Arduino Uno and an esp32. Its a very simple code, I really cant find the issue. I've even tried this code with an ESP12-F and It crashes on that too.
User avatar
By entozoon
#87992 I had the same issue! It turns out that if you're controlling the stepper motor by using:

Code: Select alldelayMicroseconds

Then it can cause crashes. The reason being that it is a blocking function and eventually knackers it (explanation here https://github.com/esp8266/Arduino/issues/2240#issuecomment-230776603 )

However, there is a solution! Us a stepper library that doesn't involve blocking. One example is AccelStepper.h which has an example usage toward the end of this tutorial:
https://www.makerguides.com/drv8825-stepper-motor-driver-arduino-tutorial/
User avatar
By pangolin
#87996
entozoon wrote:I had the same issue! It turns out that if you're controlling the stepper motor by using:

Code: Select alldelayMicroseconds

Then it can cause crashes. The reason being that it is a blocking function and eventually knackers it (explanation here https://github.com/esp8266/Arduino/issues/2240#issuecomment-230776603 )

However, there is a solution! Us a stepper library that doesn't involve blocking. One example is AccelStepper.h which has an example usage toward the end of this tutorial:
https://www.makerguides.com/drv8825-stepper-motor-driver-arduino-tutorial/


You cause analysis is correct but your solution is wrong: Accelstepper does indeed also contain blocking functions and can / will also cause wdt resets when used incorrectly, see: viewtopic.php?f=160&t=21616
User avatar
By eckstazy
#89107 I'm having this exact same problem, except i get the exception whether or not I am delaying the code or not.

I;ve searched everywhere and can't seem to figure out how to solve this problem.

Here is my stack trace:

Code: Select allSoft WDT reset

>>>stack>>>

ctx: cont
sp: 3ffffde0 end: 3fffffc0 offset: 01a0
3fffff80:  3fffdad0 00000392 3ffee368 4020142b 
3fffff90:  3fffdad0 3ffee3b0 3ffee368 40201084 
3fffffa0:  feefeffe 00000000 3ffee3d8 40201e00 
3fffffb0:  feefeffe feefeffe 3ffe84e4 40100bf9 
<<<stack<<<


Which equates to this:

Code: Select allDecoding stack results
0x4020142b: Stepper::step(int) at /Arduino/libraries/Stepper/src/Stepper.cpp line 198
0x40201084: loop() at /Arduino/sketch_oct14a/sketch_oct14a.ino line 21
0x40201e00: loop_wrapper() at /Arduino15/packages/esp8266/hardware/esp8266/2.7.4/cores/esp8266/core_esp8266_main.cpp line 197