Post topics, source code that relate to the Arduino Platform

User avatar
By laxmimerit
#39102
It's not the conversion, it's the length of the resulting string that causes the issue, something to do with the TCP-packet buffer length. What's the length of the string before the conversion, ie. the length of the data read from the client?

I am sending hello from my client to server then I want to send ADC value every time but it is not working. I am getting around 5-6 sec time delay to send next packet.
User avatar
By laxmimerit
#39103 What I found here, it is waiting almost 5-6 second to send data to client
Code: Select all Serial.write("\nSending ADC value to client");
      line = String(adc);                               // if I comment this line, its speed is much enough to gain 50 sample/second
      serverClient.println(line);

and it is not taking time in conversion, I have moved "line = String(adc)" before reception of signal but when I am debugging it using print command, it is working fine upto client send. It waits only before that line.
perhaps It is not sending data to client properly. is there any other method to send data to client.
User avatar
By WereCatf
#39104
laxmimerit wrote:I am sending hello from my client to server then I want to send ADC value every time but it is not working. I am getting around 5-6 sec time delay to send next packet.


Did you try padding the output like I suggested and seeing if that reduces the delay?