thelastoutpostworkshop/gpio_viewer
Sobre
Biblioteca Arduino GPIOViewer para visualizar os pinos GPIO em tempo real em placas ESP32.
Ferramentas de desenvolvimentoCrescimento medido de estrelas
- em 24 h
- 0
- em 7 dias
- +1
- em 15 dias
- +3
- em 1 mês
- +7
Variações líquidas em períodos sobrepostos, não totais diários. Medições ausentes ficam em branco. Estrelas indicam interesse, não qualidade.
README.md
OriginalGPIOViewer Arduino Library to see live GPIO Pins on ESP32 boards
Transforms the way you troubleshoot your microcontroller projects.
Youtube Tutorial
Installation
Installation Arduino IDE (Version 2)
ℹ️ Make sure you have the latest ESP32 boards by Espressif Systems in your Board Manager
- Install the GPIOViewer Library with the Arduino IDE Library Manager or Download the latest stable release and install the library in the Arduino IDE :
Sketch > Include Library > Add ZIP Library... - Install ESPAsyncWebServer using the Arduino IDE Library Manager
- Install the the Async TCP using the Arduino IDE Library Manager.
Installation VSCode + PlatformIO
ℹ️ The
pioarduinoplatform below uses Arduino-ESP32 4.0.0 and requires PlatformIO Core 6.2 or newer. Pioarduino Core releases
Add (or change) the following in your platformio.ini file. Replace <your-esp32-board> with your board's PlatformIO board ID (for example, esp32dev):
[env:your_board]
platform = https://github.com/pioarduino/platform-espressif32/releases/download/61.04.00/platform-espressif32.zip
board = <your-esp32-board>
framework = arduino
lib_deps =
https://github.com/ESP32Async/ESPAsyncWebServer.git
https://github.com/ESP32Async/AsyncTCP.git
https://github.com/thelastoutpostworkshop/gpio_viewer.git
After changing the platform, run PlatformIO: Clean and build the project again so PlatformIO downloads the new platform. Every Arduino sketch also requires both a setup() and a loop() function, even when loop() is empty.
Usage
ℹ️ You can also get examples provided with the library in the Arduino IDE through the menu
File > Examples > GPIOViewer
ℹ️ You only need to include the library, declare the GPIOViewer and call begin() at the end of your setup, and that's it!
#include <gpio_viewer.h> // Must me the first include in your project
GPIOViewer gpio_viewer;
void setup()
{
Serial.begin(115200);
// Comment the next line, If your code aleady include connection to Wifi in mode WIFI_STA (WIFI_AP and WIFI_AP_STA are not supported)
gpio_viewer.connectToWifi("Your SSID network", "Your WiFi Password");
// gpio_viewer.setPort(5555); // You can set the http port, if not set default port is 8080
// Your own setup code start here
// Must be at the end of your setup
// gpio_viewer.setSamplingInterval(25); // You can set the sampling interval in ms, if not set default is 100ms
// gpio_viewer.setSkipPeripheralPins(false); // Default true: skip I2C/SPI/UART pins owned by peripherals
gpio_viewer.begin();
}
ℹ️ The default HTTP port is 8080 and default sampling interval is 100ms
ℹ️ On ESP32 core v4, Pin Details shows the current Arduino-tracked assignment. GPIOViewer skips level sampling on active peripheral pins by default and continues sampling GPIO, PWM, and one-shot ADC pins. Use setSkipPeripheralPins(false) to read the digital level of those peripheral pins.
ℹ️ Wifi must be in mode WIFI_STA (WIFI_AP and WIFI_AP_STA are not supported)
ℹ️ The GPIOViewer application supports mDNS. If available on your network, you can access it at http://gpioviewer.local:8080 (with the port number used in a setPort()). If mDNS is unavailable/blocked, use the IP address URL printed on the serial monitor (with the port number used in a setPort()).
ℹ️ mDNS name vs. router hostname: GPIOViewer registers
gpioviewer.localfor mDNS access but does not change the Wi-Fi/DHCP hostname. Your router may display a default name such asesp32c3-16975Ceven whenhttp://gpioviewer.local:8080works correctly.
To also change the Wi-Fi/DHCP hostname, call WiFi.setHostname() in your setup() before starting Wi-Fi, including before any WiFi.mode(), WiFi.begin(), or connectToWifi() call:
WiFi.setHostname("gpioviewer"); // Do not include ".local"
gpio_viewer.connectToWifi("Your SSID network", "Your WiFi Password");
SD/MMC bus status on Arduino-ESP32 core v4
On boards with an SD/MMC host, sketches that use SD_MMC can show the bus clock and mode under ESP32 Information → Storage. Include <SD_MMC.h> after <gpio_viewer.h> and call gpio_viewer.updateSDMMCBusStatus(SD_MMC) after the sketch mounts the card. Call it again after each remount or after SD_MMC.end() to refresh or clear the recorded status.
GPIO Supported
- Digital
- Analog
- PWM
- ADC
Library Size
- The GPIOViewer Library adds 50 KB to your projects.
- No worries! All the assets (ex. board images) of the web application are loaded from github pages and don't add to the size of your projects.
Espressif Arduino ESP32 Core Compatibility
- GPIOViewer supports Espressif Arduino-ESP32 core 3.x and 4.x.
- If you want support for the Arduino Core v2.x, use version 1.6.3 of the GPIOViewer library.
- GPIOViewer skips ADC monitoring on ESP32-S31 because that chip uses a comparator ADC with a different readout format.
Performance
- Ensure you have a strong Wifi signal with a good transfer rate. 25ms sampling interval works great on Wifi 6 with 125 Mbps.
- If you get "ERROR: Too many messages queued" on the Serial Monitor, this means the data is not read fast enough by the web application. The data will still be displayed, but with some latency. Reduce the sampling interval or try to improve your Wifi performance.
Contributors
Contributors are welcomed! If you want to submit pull requests, here is how you can do it.
Troubleshooting
Last tested to be working on
- Versions 3.3.13 and 4.0.0 of Arduino-ESP32
- Version 3.6.1 of Async TCP
- Version 3.12.1 of ESP Async WebServer
Conflicts with pin function detection on some boards
Since version 1.5.6, the library detects pin functions like ADC and Touch, this has been causing problems on some boards, like the XiaoESP32-S3-Sense. You can disable pin detection by adding this define before including the library :
#define NO_PIN_FUNCTIONS
#include <gpio_viewer.h>
Code not compiling
If your code don't compile, before submitting an issue:
Try placing this header file after all other includes:
#include <gpio_viewer.h>
- Compile with the latest stable release of the GPIOViewer Library and with the latest ESP32 boards
- See also this solved issue
GPIOViewer running
If GPIOViewer is running and your are experiencing problems in the web application, before submitting an issue:
- Make sure you are using the latest stable release of the GPIOViewer Library
- Clear your browser cache data and refresh the window in your browser
ESP32 Boards Supported
Browse 59 ESP32 boards with names and photos from the GPIOViewer web app.
Use Generic View to monitor GPIO activity on ESP32 boards without a dedicated image.
Explore projetos relacionados
Carregando…

