Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By Dulag Utok
#42318
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 all  char 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.
User avatar
By Dulag Utok
#42336
martinayotte wrote:Maybe try it at slower baudrate ...


slower baud rate for both esp and arduino? i tried lowering the baud rate of the arduino but still used the 115200 for the esp. doesn't work at all. Does this means i have to flash may esp with a firmware which has a slower baud rate?