I'm sure I'm missing something obvious, but I've been googling for a good half hour now and I can't figure it out.
I'm trying to print some debug message to the Serial Monitor. Something like this:
int test1 = 15; int test2 = 32; Serial.println("The value of test1 is " + test1 + " and the value of test2 is " + test2).
That should print to Serial Monitor "The value of test1 is 15 and the value of test2 is 32".
Does anyone have any tips on how I would make that happen?
Thanks hugely for any help.
Edit: as usual, posting made me see the answer. To anyone else who comes down this path, use print in combination with println. If anyone else knows a way to do in-line concatenation, please post.
Serial.print("The value of test1 is "); Serial.print(test1); Serialprint(" and the value of test2 is ); Serial.print(test2); Serial.println("");