user17137: I'm porting some code from Arduino Uno over to a Mega and I want to replace a SoftwareSerial defined in the previous code with one of the built-in UARTs.
Rather than go through and replace all references to the serial port, I'd prefer to create an alias for Serial1. The alias can be a constant.
In my old code, I setup the Software Serial as follows:
//SoftwareSerial HMI(HMIRX, HMITX); // Define software serial for the HMI adapter (RX, TX)

I"m not even sure where to start.

user37622: it is simple
#define HMI Serial1

17137: <p>I'm porting some code from Arduino Uno over to a Mega and I want to replace a SoftwareSerial defined in the previous code with one of the built-in UARTs.</p>

<p>Rather than go through and replace all references to the serial port, I'd prefer to create an alias for Serial1. The alias can be a constant.</p>

<p>In my old code, I setup the Software Serial as follows:</p>

<pre><code>//SoftwareSerial HMI(HMIRX, HMITX); // Define software serial for the HMI adapter (RX, TX)
</code></pre>

<p>I"m not even sure where to start.</p>
 37622: <p>it is simple
<code>#define HMI Serial1</code></p>
