-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Description
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
can anyone help with this
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels