Hi all,
I'm having a very strange problem. I have a Tian that is programmed to send out sensor data to a server
every x seconds.
My program run well but after 14,15 hours of operation it stops working and I don't receive datas. The program is fast at the beginning, then after 2 to 3 hours before stopping, it becomes more and more slow with the message "timeout".
I think maybe a misuse of the Ciao library on my part could be at the root of the problem. Or maybe a modification at the program level could correct the problem. So if I can have some help about this..
(the problem doesn't come from the use of String, I have already tested use of array with cstrings and it doesn't work).
Here is the part of the program that I think is problematic (there is another CiaoReadWrite nearly similar to the first) :
void CiaoReadWrite1()
{
CiaoData data = Ciao.read("restserver");
if (!data.isEmpty())
{
String id = data.get(0);
String sender = data.get(1);
String message = data.get(2);
splitString(message,"=",LtT2,9);
gen =LtT2[0].toInt(); LtT2[0]="";
belt =LtT2[1].toInt(); LtT2[1]="";
genReady =LtT2[2].toInt(); LtT2[2]="";
hvOnOff =LtT2[3].toInt(); LtT2[3]="";
beep =LtT2[4].toInt(); LtT2[4]="";
heart1 =LtT2[5].toInt(); LtT2[5]="";
sendConf =LtT2[6].toInt(); LtT2[6]="";
heart2FB =LtT2[7].toInt(); LtT2[7]="";
beepFB =beep;
heart1FB =heart1;
sendConfFB =sendConf;
Ciao.writeResponse("restserver",id, String(baroAlti*100)+"="+baroHumi*10+"="+baroPres+"="+baroTemp*10+"="+beepFB+"="+heart1FB+"="+heart2+"="+sendConfFB+"="+
secCust1+"="+secCust2+"="+secEmrgSW+"="+secloop+"="+secLoop1+"="+secLoop2+"="+gndSwGnd+"="+gndSwUGnd+"="+statusA1+"="+
statusA2+"="+statusA3+"="+beltStat1+"="+beltStat2+"="+beltStat3+"="+beltStat4+"="+request+"=");
request++;
}
}
Thanks




