Hi forum,
As a newbee I just tried the StringAppendNumber Example from the string library and was surprised by the output (copied below).
The first three lines of analog reading output are wrong. Is this a known issue and is there some fix available for this?
output:
String Library version: 0.9
Anlog Reading: 28
Anlog Reading: 1682049
Anlog Reading: 167 time since program started:
Anlog Reading: 165 time since program started: 6123
...
unmodified code from StringAppendExample
void loop () {
dataString = "Anlog Reading: ";
// Read the analog input:
int analogValue = analogRead(0);
// get the millis():
long timeStamp = millis();
// add the reading to the string:
dataString.append(analogValue);
// add some more text:
dataString.append("\t time since program started: ");
// add the timestamp:
dataString.append(timeStamp);
// print the string:
Serial.println(dataString);
}
Thanks a lot,
Bart