thelastoutpostworkshop / gpio_viewer
- среда, 3 января 2024 г. в 00:00:04
GPIOViewer Arduino Library to see live GPIO Pins on ESP32 boards
Transforms the way you troubleshoot your microcontroller projects.
ℹ️ Make sure you have the latest ESP32 boards by Espressif Systems in your Board Manager
Sketch > Include Library > Add ZIP Library...
Sketch > Include Library > Add ZIP Library...
Add the following to your platformio.ini file:
lib_deps =
https://github.com/dvarrel/AsyncTCP.git
https://github.com/me-no-dev/ESPAsyncWebServer.git
https://github.com/thelastoutpostworkshop/gpio_viewer.git
ℹ️ You can also use 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!
ℹ️ The URL to the web GPIO viewer application is printed on the serial monitor
#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
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.begin();
}
ℹ️ The default HTTP port is 8080 and default sampling interval is 100ms.
ℹ️ You can use the "Generic View" in the GPIO Web Application to see GPIO pin activites live even if your board image is not listed
ℹ️ You can also request an ESP32 board image addition by creating a new issue.