I know I can use
Serial.print ("Contact ");
Serial.print (myvar); //Myvar is an int.
Serial.println(" is closed");
but is there a way of putting that into one Serial.println() statement.
I can't find the syntax for it.
I know I can use
Serial.print ("Contact ");
Serial.print (myvar); //Myvar is an int.
Serial.println(" is closed");
but is there a way of putting that into one Serial.println() statement.
I can't find the syntax for it.
Option 1:
http://playground.arduino.cc/Main/StreamingOutput
Option 2:
Use sprintf() to create a single string to print
Thanks for that Arrch.
At the moment, Playground is just returning a blank screen. I'll try again later.
It's pointing to this library
http://arduiniana.org/libraries/streaming/
Take also a look at what they saying in this post
American2020:
It's pointing to this library
Thanks for that, American2020.
BTW, Playground is still giving me a blank page. Anyone know the reason?
It's working now.
Doc