Assistance with String building
hi, new arduino , i'm working on temperature sensor project sends temps web server.
i'm trying build "post" command strings, i'm finding aduino truncating string , i'm not sure why. know there complexities string command , i'm hoping can help.
declared @ beginning of program:
declared in setup:
declared in loop function:
after 5th assignment string reverts empty , starts over. i'm not sure if i'm hitting sort of string length limit or else. tired changing order of output in case in variable causing problem issue remained in same place.
what missing? thanks.
i'm trying build "post" command strings, i'm finding aduino truncating string , i'm not sure why. know there complexities string command , i'm hoping can help.
declared @ beginning of program:
code: [select]
string outputstring;
declared in setup:
code: [select]
outputstring = string("");
declared in loop function:
code: [select]
outputstring = string(outputstring + "temp01=" + dtostrf(temperatures[1], 3, 1, buffer));
outputstring = string(outputstring + "&temp02=" + dtostrf(temperatures[2], 3, 1, buffer));
outputstring = string(outputstring + "&temp03=" + dtostrf(temperatures[3], 3, 1, buffer));
outputstring = string(outputstring + "&temp04=" + dtostrf(temperatures[4], 3, 1, buffer));
outputstring = string(outputstring + "&temp05=" + dtostrf(temperatures[5], 3, 1, buffer));
outputstring = string(outputstring + "&temp06=" + dtostrf(temperatures[6], 3, 1, buffer));
outputstring = string(outputstring + "&temp07=" + dtostrf(temperatures[7], 3, 1, buffer));
outputstring = string(outputstring + "&temp08=" + dtostrf(temperatures[8], 3, 1, buffer));
after 5th assignment string reverts empty , starts over. i'm not sure if i'm hitting sort of string length limit or else. tired changing order of output in case in variable causing problem issue remained in same place.
what missing? thanks.
you're missing posting code.
Arduino Forum > Using Arduino > Programming Questions > Assistance with String building
arduino
Comments
Post a Comment