Hi,
first of all I’m new with Blynk.
I have an external small weather station (with ESP8266) that sends data from sensors every 10 minutes to another ESP8266 equipped with a 2.8" LCD display that shows data and sends data to Blynk.
The connection between ESP8266s is made through WiFiClient library, everything has worked without problems until I added code to send data to Blynk.
When the weather station connects to the “display station”, on this last I can read (from serial monitor) that the client connects but then nothing else happens and data seems not to be received.
This is the code that reads data from the weather station (“loop()” routine):
client = server.available();
if (client)
{
if (client.connected())
{
Serial.println("Connected to client");
}
if (client.available() > 0)
{
// Read incoming message
String strDati = client.readString();
Serial.println(strDati);
...code to process data and then send to Blynk
}
}
When the weather station connects, the message “Connected to client” appears on the serial monitor but then nothing else happens…it seems that the line "if (client.available() > 0) " is not true and then subsequent code is not executed.
If I disable the “Blynk code”, everything works again.
What should I check?
Thank you, best regards.
Roberto