I want write code with led matrix without delay, i use library "MD_MAX72xx.h", but when i add millis(), esp8266 has been crash "Soft WDT reset". Please help me!
Here my code, sorry my english
i'm not familiar with the esp32, but based on your comments, it seems that loop() should not take too long otherwise there is a watchdog timer reset.
by adding the code with millis() it looks like you want to delay the update of each digit by 50 msec which takes 400 msec for all 8 digits.
if this is what you really want to do (instead possibly just updating the entire delay every 50 msec) then you would need to check if 50 msec has elapsed in loop() and call a routine to update a specified digit with a specified character, allowing loop() to return whether the condition is true or not.
gcjr:
i'm not familiar with the esp32, but based on your comments, it seems that loop() should not take too long otherwise there is a watchdog timer reset.
by adding the code with millis() it looks like you want to delay the update of each digit by 50 msec which takes 400 msec for all 8 digits.
if this is what you really want to do (instead possibly just updating the entire delay every 50 msec) then you would need to check if 50 msec has elapsed in loop() and call a routine to update a specified digit with a specified character, allowing loop() to return whether the condition is true or not.
thank you for help.
I want variable "i" increse every 50ms in while() loop in scrollChar(char *p) function
6v6gt:
You should post all your code for proper response, but you cold try adding the yield() statement in your while() loop to see if the problem goes away.
thank for reply.
i add yield() and it work, but i don't know yield() mean
yield() can be used in a loop to refresh the watchdog timer and allow other activities to proceed (such as servicing the wlan functions) preventing these crashing your program.
On the ESP8266, any uninterrupted loops must be short (a few mS) otherwise you could have this problem.
6v6gt:
yield() can be used in a loop to refresh the watchdog timer and allow other activities to proceed (such as servicing the wlan functions) preventing these crashing your program.
On the ESP8266, any uninterrupted loops must be short (a few mS) otherwise you could have this problem.