Can I switch from Serial to SoftwareSerial at runtime with the same baud? I'm trying to use a GPS and the Adafruit thermal printer module with an Arduino Nano in the same project (both use baud 9600) and was wondering if I could do something like in the code below? Basically, in the example I made, I'm getting the time from the GPS and when it's on the minute, it will call the printTime() method.

What I'm wondering is if it's okay to do what I did in my disableGPS, enablePrinter methods by ending the serial connection for GPS and starting it for my printer? I feel like this should work, but I don't fully understand serial connections.

If this doesn't work, is there an alternative I could do? I never need to read from GPS and write to the printer at the same time in code.

#include &lt;Adafruit_Thermal.h&gt;
#include &lt;TinyGPS++.h&gt;
#include &lt;SoftwareSerial.h&gt;
#define PrinterTXPin 6 // Arduino transmit  YELLOW WIRE  labeled RX on printer
#define PrinterRXPin 5 // Arduino receive   GREEN WIRE   labeled TX on printer

static const uint32_t baud = 9600;
//Printer
SoftwareSerial PrinterSerial(PrinterRXPin, PrinterTXPin);
Adafruit_Thermal printer(&amp;PrinterSerial);
//we only want to print on the minute
boolean havePrinted = false;

//GPS
TinyGPSPlus gps;
TinyGPSDate lastDate;


void setup() {
  enableGPS();
}

void loop() 
{
  if(gps.time.isValid() &amp;&amp; checkDate(gps.time)){
    printTime(gps.time);
  }
}

boolean checkDate(TinyGPSTime theTime)
{
 if(theTime.second() == 0 &amp;&amp; !havePrinted)
 {
    havePrinted = true;
    return true;
 }
 if(theTime.second() == 1){
    havePrinted = false;
 }
}

void printTime(TinyGPSTime theTime)
{
  //Disable since we can only have 1 serial connection per baud
  disableGPS();
  enablePrinter();

  printer.doubleHeightOn();
  printer.println(theTime.hour() + ":" + theTime.minute());
  printer.feed(1);

  disablePrinter();
  enableGPS();
}

void enablePrinter()
{

  PrinterSerial.begin();
  printer.begin();
  printer.wake();
}

void disablePrinter()
{
  printer.sleep();
  PrinterSerial.end();
}

void disableGPS()
{
  Serial.end();
}

void enableGPS()
{
  Serial.begin(baud);
}
I think you are missing what the baud rate is.  It is the speed at which the data is transmitted.   So the fact that your two devices are the same is not an issue.   It looks like from the code that your gps is connected to the hardware serial(pins 0,1 on uno) and the printer is on a software serial( pins 5,6)   If this is the case, there is no reason to turn off either of them, they can both work. In the case of using multiple SOFTWARE serial connections, only one can be 'listening' at any time, so you must switch between them. This is not the case in your code, as there is only one software serial connection.