4
votes

I'm working on a project that needs to use at least 2 serial communications (2 TXs and RXs) alternately and in different pins. I wonder if it is possible to program the Arduino Nano for this task. I conducted research on the internet and saw that the processor that hardware (ATmega328) has only one UART, and by default this Arduino has dedicated 1 pin TX and one RX, but also saw that it would be possible in the Arduino UNO, which has the same processor, work with 2 serial communications using the SoftwareSerial library, it would be possible that the Arduino Nano?

1
Sure... SoftwareSerial just uses common GPIOs, so you COULD even use all of your GPIOs for serial transmission/receive; this, however, becomes quite useless when trying to use lots of them, since the processor can't give attention to all of them concurrently.. But at least you can use a couple of them without worrying too muchfrarugi87

1 Answers

5
votes

Yes you can use Software Serial library for multiple Serial communication.

As declared by https://www.arduino.cc/en/Main/ArduinoBoardNano using this method:

#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11); // RX, TX
SoftwareSerial mySerial1(8, 9); // RX, TX