I have an Arduino MEGA and I am trying to use 2 devices composed of RX and TX pins in it, however I am having difficulties.
The devices are:
-
Nextion LCD Display
-
VR Recognizer V3 (Voice Recognition Module)
When I use the code according to their library, I have the following problem ... Both receive Arduino commands, the Arduino manages to send commands to both, BUT only 1 module can send commands to the Arduino (in this case always the voice module ).
I discovered that it is possible to use several pins of communication with the Arduino MEGA, I tried to do this but the commands are sent "raw" to the Arduino, plus I have to try to figure out how to read them, I also have the problematic to use their library facilities ...
#include <SoftwareSerial.h> // (DISPLAY)
#include <Nextion.h> // (DISPLAY)
SoftwareSerial nextion(10, 11); // (DISPLAY)
Nextion myNextion(nextion, 9600); // (DISPLAY)
#include "VoiceRecognitionV3.h" // (VOICE MODULE)
SoftwareSerial VR myVR(53, 52); // (VOICE MODULE)
This is the default configuration (according to each library), but when I use this, only one module can communicate 100% with Arduino, the other only receives data ....
What can I do to fix this? Is there anyway to use them without using Rx1,Tx1,Rx2 and Tx2 pins?