martinayotte wrote:Serial.read() is returning characters one by one of the string, not the actual integer value from sensor that you sent.
You need to acumulate all the characters until newline and then you can send it to Wifi client.Code: Select allchar buf[64];
int i = 0;
if (Serial.available()) {
int inByte = Serial.read();
buf[i] = (char)inByte;
if (inByte == '\r' or inByte == '\n' or i > (sizeof(buf) - 1)) {
buf[i] = 0;
i = 0;
client.println(buf); // here we sent the whole line to the WiFi client
}
ow wow. I'll try this one. thank you so much Mr. Martinayotte.