arduino-mqtt icon indicating copy to clipboard operation
arduino-mqtt copied to clipboard

BUILTIN_LED Flashing on ESP32DevelopmentBoard.ino

Open ForrestErickson opened this issue 1 year ago • 4 comments

Problem Description

I have an ESP32 WROOM 32 Dev1 Kit When I load the ESP32DevelopmentBoard.ino example file (making the necessary SSID and PW changes) I get the built in LED flashing several times a second. This dev kit is several years old, perhaps as old as 2020.

The code

This is the code with which I started. https://github.com/256dpi/arduino-mqtt/blob/master/examples/ESP32DevelopmentBoard/ESP32DevelopmentBoard.ino

Oscilloscope on BUILTIN LED

image

Another user does not have this problem but their ESP was purchased probably in 2024.

Photo of ESP32

image

The IDE Set for ESP32 WROOM

image

ForrestErickson avatar Oct 24 '24 20:10 ForrestErickson

Oscilloscope Waveform For Various Publishing Delays

LED waveform with the publishing delay set for 5000 ( 5 seconds)

image

LED waveform with the publishing delay set for 500 ( 1/2 second)

image

Some Observations

The narrow pulse size is independent of the publishing rate. The wider pulses are occurring more frequently on the shorter publishing timing.

ForrestErickson avatar Oct 24 '24 21:10 ForrestErickson

Long Message Makes No Effect

I replaced the text message with the text of Lincoln's Gettysburg address.

A Processing sketch I made to subscribe to the publication git it all image

There is no effect on the rate or duration of the blinking LED. It looks just the same as the 500 mS publication rate as with the small payload. image

Transition to Publishing

I modified the code to publish only when I held down the BOOT button. When not publishing the narrow pulses were all we saw at about 100 mS. Once I pressed the Boot button to publish then we got pulses of nearly 100 mS duration image

ForrestErickson avatar Oct 24 '24 21:10 ForrestErickson

Hi @ForrestErickson , I get the same pulsing LED on my configuration: Sparkfun Micromod Single + Teensy Processor. The processor LED (blue, PIN 13) flickers rapidly as long as mqttClient.loop() is used (it does not flicker when mqttClient.publish() is called).

Did you find a solution for that? I did not find any calls to digitalWrite in the library, but maybe I look at the wrong spot..

michaelheiml avatar Aug 13 '25 08:08 michaelheiml

Regarding, "Did you find a solution for that? I did not find any calls to digitalWrite in the library, but maybe I look at the wrong spot.."

I do not remember further work on this issue. And I no longer remember which development kit on which I produced the problem.

Also some time ago, we migrated our project from the mqtt.h library to the <PubSubClient.h> // From library https://github.com/knolleary/

And IIRC I checked that there was no problem with the LED after the migration.

I hope I am remembering correctly.

Let us know what you find.

ForrestErickson avatar Aug 13 '25 16:08 ForrestErickson