Add link to play with gpio 2

On root page add html link to play with gpio 2
This commit is contained in:
Mathieu Maret 2016-03-03 00:54:32 +01:00
parent d1db2b5d70
commit 1f9986da85

View File

@ -25,7 +25,11 @@ ESP8266WebServer server(80);
* connected to this access point to see it. * connected to this access point to see it.
*/ */
void handleRoot() { void handleRoot() {
server.send(200, "text/html", "<h1>You are connected</h1><br/><a href=\"/setup\">Setup</a>"); server.send(200, "text/html", "<h1>You are connected</h1><br/>"
"<a href=\"/setup\">Setup</a><br/>"
"<a href=\"/gpio?gpio=2&amp;value=1\">ON</a><br/>"
"<a href=\"/gpio?gpio=2&value=0\">OFF</a><br/>"
);
} }
void handleSetup() { void handleSetup() {