You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
NeoSWSerial cannot read from multiple instances #59
i'm using two neoswserials.
NeoSWSerial mySerial1( 5, 4);
NeoSWSerial mySerial2( 6, 8);
void loop(){
//mySerial2.ignore();
//mySerial1.listen();
if (mySerial1.available()) {
char data = mySerial1.read(); // Read the incoming byte
// Process the received data from port 1
Serial.print("Data from port 1: ");
flagserial = 1;
processReceivedChar(data);
updateCurrent();
}
//mySerial1.ignore();
//mySerial2.listen();
if (mySerial2.available()) {
char data = mySerial2.read();// Read the incoming byte
// Process the received data from port 2
Serial.print("Data from port 2: ");
flagserial = 2;
processReceivedChar(data);
updateCurrent();
}
}
the above code is my loop function. but the values are read only from one serial
Activity
[-]NeoSWSerial does not read from multiple instances[/-][+]NeoSWSerial cannot read from multiple instances[/+]