I have a LoRa Click Module and Adafruit Ultimate GPS which both use Serial Communication.
I wish to just check the initial tests with all the components in on the Serial Console. Hence I have declared :
SoftwareSerial GPSSerial(10,11);
SoftwareSerial LoRaSerial(5,6);
Apparently when I declare them and upload the code on the board I do not obtain any information.
observations
However when I comment out the
LoRaSerial
declaration I obtain the GPS coordinates.When I set the
SoftwareSerial LoRaSerial(10,11)
I retrieve the information.I thought
5,6
pins won't be the right choice and hence went on the setSoftwareSerial(8,9)
but I retreive no information.
inference
Nano cannot take into consideration more than 1 SoftwareSerial Component. However the Official Documentation states that all Digital pins can be used for Software Serial.
Is it too much for a Nano to have overall 3 Serial ports (including Serial
itself)?
sketch
#include <SoftwareSerial.h>
#include <TheThingsNetwork.h>
SoftwareSerial GPSSerial(10, 11); //RX , TX
SoftwareSerial LoRaSerial(8,9); // RX, TX (tried with 5,6 too)
#define freqPlan TTN_FP_EU868
TheThingsNetwork ttn(LoRaSerial, Serial, freqPlan);
void setup() {
Serial.begin(115200);
GPSSerial.begin(9600);
LoRaSerial.begin(57600);
}
void loop() {
delay(2000);
while (GPSSerial.available()) {
char c = GPSSerial.read();
Serial.write(c);
}
delay(2000);
while (LoRaSerial.available()) {
ttn.showStatus();
}
delay(2000);
}