I have a program that meature two parameter
if I click on UI just once it works great
but if I click on this parameter and rapidly click on parametr 2
wemos just send my last demand to my app(I build my app with unity )
please see this code:
//////////////////////////////////////////
if(command == "Temp"){
Serial.print("temp is recieved seccussfuly");
client.write("Temp is ");
client.println(celsTemp);
client.println("");
delay(10000); // put this delay perhaps let arduino think and then send but this trick doesnt worked.
}
if(command == "Humidity"){
client.write("Humidity is ");
client.println(humidity);
client.println("");
Serial.print("humidity ends here");
}
///////////////////////////////////////
if I click on temp and rapidly on humidity this is happening:
in my arduino serial monitoring everything capture correctly but just Second "if" prints it's content.
this is what arduino shows:
//////////////////////////////////
Client is sending Temp
Humidity : 50.13 % RH
Celsius : 27.16 C
Fahrenheit : 80.90 F
temp is recieved seccussfulyClient disconnected
0
new client
Client is sending Humidity
Humidity : 50.15 % RH
Celsius : 27.15 C
Fahrenheit : 80.88 F
humidity ends hereClient disconnected
///////////////////////////////////////////////
u can see both recieved but just one sends
...I'm also think of that arduino send array instead of just one string but it seams not true and it realy just send last string