|
Post by robotmachines on Feb 10, 2023 10:18:06 GMT
I'm having some trouble with Serial1 on my ShieldBuddy TC375 using the Arduino IDE 1.8.19. Following code just sends serial data back and forth between two ports on the TC375. If I use Serial1, it does not work. If I change Serial1 to Serial0, and move the wires over, then it does work. Any thoughts, please? Thanks
#define TEST_BAUDRATE 57600 #define SerialRxTx Serial
void setup() { SerialASC.begin(115200); SerialRxTx.begin(TEST_BAUDRATE); Serial1.begin(TEST_BAUDRATE); }
void loop() { delay(100);
SerialRxTx.print("hello from SerialRxTx");
while(Serial1.available()) { SerialASC.write(Serial1.read()); } SerialASC.println("");
Serial1.print("hello from Serial1");
while(SerialRxTx.available()) { SerialASC.write(SerialRxTx.read()); } SerialASC.println("");
}
|
|