Spying On The ESP32’s GPIO

The ESP32 has been a go-to microcontroller platform for a while now, thanks to its versatile capabilities, integrated Wi-Fi and Bluetooth connectivity, and low power consumption. It’s ideal for a wide range of projects especially those revolving around IoT, partially because of all of the libraries and tools available for it now. The latest tool from [The Last Outpost Workshop] adds a feature we didn’t know we wanted until now: a webserver showing real-time updates of what all of the GPIO pins are doing.

The live GPIO pin monitoring library sets up the ESP32 to stream information about what all of the pins are doing in real time to a webserver, which displays the information as a helpful graphic. The demonstration in the video below shows and example troubleshooting a situation where the code is correct but there’s a mistake in the wiring, helping to quickly identify the problem and hopefully eliminating a wild goose chase for a bug in the software. The library can be quickly installed using the Arduino IDE and only requires the use of one other library and a few lines of code to get everything up and running.

As far as a debugging tool goes, something like this could save a lot of us a significant amount of time, especially with how easy it is to set up. A real-time look into the pins and their behavior, including those set up for PWM, is invaluable for plenty of situations. Of course if you’re building something like a real-time operating system that needs responses within a very specific interval you may want to look at more in-depth strategies for probing the GPIO.

Thanks to [Bob] for the tip!

https://www.youtube.com/watch?v=UxkOosaNohU

8 thoughts on “Spying On The ESP32’s GPIO

  1. I can get a pre-certified esp32 module via distributors for ~2-3$ with BT classic/BLE/Wifi.. are there any competitive alrernative parts out there with BT classic? Seems like Infineon parts are more expensive & tough for non-tier-1 to get access to QCOM.. though these parts should be lower power vs esp32?

  2. I picked up a couple of $3 wifi outlets, they have esp32s for controlling them, and I found hacking info. One has a built in power meter, looking forward to seeing if this will allow me to read it without the buggy app that these use.

  3. In terms of actual debugging this seems pretty useless. I don’t think I have ever had a situation where this would be useful. Most of the time it it isn’t a wiring issue then I need to use a logic analyser, multimeter or oscilloscope.

    Also the web server will use up computing resources and will need to create it’s own WiFi network or connect to an existing one. Then there is the downside that it is only for ESP32, it’s better to learn how to debug using tools that you can use for most microcontrollers. Then because it is hosted by the ESP32, if anything happens that causes the ESP32 to halt or glitch or get stuck in a boot loop then the web server won’t work.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.