Hallo,
wenn es nicht zur Laufzeit , sonder beim Compilieren entschieden wird könnte #define eventuell eine Lösung sein.
#define Printer Serial
// #define Printer Serial1
void setup() {
// put your setup code here, to run once:
Printer.begin(115200);
Printer.println("Hallo");
}
void loop() {
// put your main code here, to run repeatedly:
}