Chat freely about anything...

User avatar
By Lotus
#28675 Hi,
I'm trying basic LED control, either on/off or PWM with both the Eclipse based compiler by CHERTS (e.g. with the Blinky example) and the Arduino IDE.

I have an issue with the GPIO output not being consistent 100% of the time. There are cyclical times (around every 10 seconds) where the GPIO (used as the output to control an LED) will stall on or off for a second.

Can someone explain why the code is stalling and how to prevent this so as to have a consistent blink rate.

BTW, during the stall there seems to be some UART traffic.
User avatar
By martinayotte
#28677 What are you seeing on the serial port during those hangs ?
Is it a crash where the ESP is simply restarting and then the blinking resume ?
(It is probably the usual power supply issue)
User avatar
By Lotus
#28681 With the Eclipse Blinky, Blinky2 examples the UART traffic isn't comprehensible. With the Arduino Blink example there is no UART traffic however there are stalls every so often. Occasionally with Arduino there are no stalls.

I'm using a blink rate of 10 Hz to see these stalls.
User avatar
By martinayotte
#28702 Add a comprehensive serial.println("Now entering Setup ...") in your setup loop.
If you see that message every time it hangs, then for sure, your ESP is resetting by itself.
Again, probably caused by improper power supply.