user57796: In many examples I see the following:
#include <SoftwareSerial.h>

const byte rxPin = 2;
const byte txPin = 3;

// set up a new serial object
SoftwareSerial mySerial (rxPin, txPin);

what is the benefit of mapping pins 2 and 3 like this? Why not just use the built in RX (pin 0) and TX (pin 1) pins? I'm using a standard Arduino Uno.

user82319: Nick Gammon indicated Pins 0 (RX) and 1 (TX) are already connected to the USB-Serial 16U2 chip.  Correct.  Although the transmit pin, pin 1, can drive multiple devices / serial ports, the receive pin, pin 0, is being driven by the 16U2 chip.
See: https://www.arduino.cc/en/uploads/Main/arduino-uno-schematic.pdf
Trying to use this would result in tying two outputs together (never good unless the outputs are configured for open collector/open drain).  I've seen many shields that try to use pins 2 and 3 for a serial port.  (Not a good idea for a serial peripheral...)

user10794: SoftwareSerial lets you add an additional serial port using "bit banging" to read/write to the port. This lets you connect up another serial device (eg. GPS, RFID reader, MIDI device, LCD) to this extra port, and still use the hardware serial interface (pins 0 and 1) via the USB port to send messages and/or debugging to the connected PC.


Is there any special wiring needed to send messages to the connected PC? Or is it enough that they just not be in use?

Pins 0 and 1 are connected to the Atmega16U2 USB interface chip. If it gets what looks like serial data it will forward it to the PC.

57796: <p>In many examples I see the following:</p>

<pre><code>#include &lt;SoftwareSerial.h&gt;

const byte rxPin = 2;
const byte txPin = 3;

// set up a new serial object
SoftwareSerial mySerial (rxPin, txPin);
</code></pre>

<p>what is the benefit of mapping pins 2 and 3 like this? Why not just use the built in RX (pin 0) and TX (pin 1) pins? I'm using a standard Arduino Uno.</p>
 82319: <p>Nick Gammon indicated Pins 0 (RX) and 1 (TX) are already connected to the USB-Serial 16U2 chip.  Correct.  Although the transmit pin, pin 1, can drive multiple devices / serial ports, the receive pin, pin 0, is being driven by the 16U2 chip.
See: <a href="https://www.arduino.cc/en/uploads/Main/arduino-uno-schematic.pdf" rel="nofollow noreferrer">https://www.arduino.cc/en/uploads/Main/arduino-uno-schematic.pdf</a>
Trying to use this would result in tying two outputs together (never good unless the outputs are configured for open collector/open drain).  I've seen many shields that try to use pins 2 and 3 for a serial port.  (Not a good idea for a serial peripheral...)</p>
 10794: <p>SoftwareSerial lets you add an additional serial port using "bit banging" to read/write to the port. This lets you connect up another serial device (eg. GPS, RFID reader, MIDI device, LCD) to this extra port, and still use the hardware serial interface (pins 0 and 1) via the USB port to send messages and/or debugging to the connected PC.</p>

<hr>

<blockquote>
  <p>Is there any special wiring needed to send messages to the connected PC? Or is it enough that they just not be in use?</p>
</blockquote>

<p>Pins 0 and 1 are connected to the Atmega16U2 USB interface chip. If it gets what looks like serial data it will forward it to the PC.</p>
