Somebody can help me, pls?
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
const char *ssid = "ESPap";
const char *password = "thereisnospoon";
char *incomingByte = "0"; // for incoming serial data
ESP8266WebServer server(80);
void handleRoot() {
server.send(200, "text/html", "<h1>" + incomingByte + "</h1>"); //Here is the problem
}
void setup() {
delay(1000);
Serial.begin(115200);
Serial.println();
Serial.print("Configuring access point...");
WiFi.softAP(ssid, password);
IPAddress myIP = WiFi.softAPIP();
Serial.print("AP IP address: ");
Serial.println(myIP);
incomingByte = Serial.read(); //Here I read the incoming data
server.on("/", handleRoot);
server.begin();
Serial.println("HTTP server started");
}
void loop() {
server.handleClient();
}