Created
January 15, 2021 13:30
-
-
Save CelliesProjects/df38ec4af50426166591be5682296c69 to your computer and use it in GitHub Desktop.
poc code to show how to reboot your esp over http with me-no-dev ASyncWebserver.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server.on("/hw-reset", HTTP_GET, [](AsyncWebServerRequest *request){ | |
request->onDisconnect([](){ | |
#ifdef ESP32 | |
ESP.restart(); | |
#elif defined(ESP8266) | |
ESP.reset(); | |
#endif | |
}); | |
request->send(200, "text/plain","Restarting ..."); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment