I'm working on a remote control code for ESP controller. Using ESPwebserver and Fastled. When I try to return a value of an uint8_t, as a POST response, i got strange result here is the relevant code:
uint8_t PaletteBrightness = 255;
server.on("/Sync", HTTP_POST, []() {
String Sync = "PaletteBrightness:" + PaletteBrightness;
Sync += ":end";
Serial.println(Sync);
server.send(200, "text/plain", Sync);
});
The code complies, and runs fine but the result of 'Sync' in both serial, and POST response is:
Phase:end
Why? What does even Phase mean?
What I want is:
PaletteBrightness:255:end
Where the 255 is the value of 'uint8_t PaletteBrightness' Also, there will be more values, to add the 'Sync' string. Just trying to get one right.