The Arduino Uno has a single hardware UART, which is usually either used for
programming
(via
the Arduino's serial bootloader) or communication with the
serial monitor
. That serial port can only
be used to communicate with one device at any time, lest you run into problems of
.
There's also a chance that, during program upload, spurious -- even harmful -- data might be sent
to any device attached to the Arduino's hardware UART.
So to avoid any problems that might arise from connecting the XBee to the Arduino's hardware
UART, we usually take advantage of the
, connecting the XBee's RX and TX
pins to a pair of free digital pins on the Arduino.
To select between software and hardware serial, the XBee Shield includes a small, surface-mount
slide switch. This switch allows you to select between the hardware serial port (UART position) and
a software serial port connected to pins 2 (Arduino-side RX) and 3 (Arduino-side TX).
Page 8 of 24