I am using the Arduino IDE to write code and am trying to understand the namespace stuff. My thought is, is there a way to shorten the many places (in my code) where I have things like:
Serial.print("a="); Serial.print(a); Serial.print(" b="); Serial.println(b);
to something shorter like:
S.print(...
or
sprint(...
Can it be done?
I tried using String concatenation but it is very limited and expensive. That is just adding one
String s;
to my code at the global level increased the download size by 1482 bytes. And you can't do something like:
Serial.print("a=" + a); Serial.println(" b=" + b);
because it cant handle starting a concatenation with a literal string.
Any thoughts welcome.