Hello everyone, I am working on my final project using a HTCC-AB01 module to which I connect different sensors (gps, gas detector, laser distance detector, soil moisture sensor). The sensors work at different bauds, I am using the softSerial library for communication on pins GPIO5 and GPIO0, but since they work at different bauds, I am trying to use another two pins for the communication of another sensor. Can I use the same communication (softSerial) on other two pins at the same time? Because it hasn’t worked for me, or, how can I have other softSerials communicating with another sensor at another baund rate?
PS: I can’t use the TX and RX pins because I reserve them for communication with another module.
I would appreciate if you help me.
#include <softSerial.h>
softSerial mySerial(GPIO5, GPIO0);//TX, RX
//softSerial lsSerial(GPIO1, GPIO4); not work
boolean ok=false, repe=false;
byte inBuffer[26];
int bufIndx = 0;
float temperature, co2, humidity ,ch2O, co, o3, no2, pm2_5, voc;
void setup() {
mySerial.begin(9600); //MULtiplexor UART (gas, gps)
// lsSerial.begin(19200); //laser 19200
Serial.begin(9600);
pinMode(GPIO2, OUTPUT); //A
pinMode(GPIO3 , OUTPUT); //B
// pinMode(Vext, OUTPUT);
// consulta();
}