For example, i have 4 variables each containing a number: buffer1=13, buffer2=26, buffer3=39, buffer4=52. Their values are arbitrary. I want to println() such that the result is "13,26,39,52" with a comma inbetween each parameter. I know with the printf command u can do printf("whatever %c /n" whatever, whatever) however is it possible to do this with serial.println()?
It isn't possible to do with Serial.print() or Serial.println().
You can, however, use sprintf() and print your string into a buffer, then print that with Serial.println().
You might arrange for the 4 values to be in an array, and loop to print them. There is also a streaming library that simplifies printing. eg.
Serial << buffer1 << "," << buffer2 << "," << buffer3 << "," << buffer4 << endl;
Wouldn't this produce the line? - Scotty
Serial.print (" The values are: ");
Serial.print (Value1);
Serial.print (", ");
Serial.print (Value2);
Serial.print (", ");
Serial.print (Value3);
Serial.print (", ");
Serial.println (Value4);