void setup() {
Serial.begin(115200);
Serial1.begin(19200);
Serial2.begin(19200);
Serial.println("READY");
}
void loop() {
for (uint8_t i = 0; i < 12; ++i) {
Serial1.write(i);
delay(10);
if(Serial2.available())Serial.println(Serial2.read(),HEX);
} // put your main code here, to run repeatedly:
delay(100);
}
Connected Tx Serial1 to Rx Serial2 on MEGA to check is the expected values where being tx’s corrected from Serial1 and they where as expected.
Then moved Tx Serial1 connector to R4 Rx Serial1 and I’m guess getting gibberish…
anyone got any ideas as to why and how to resolve please?
The gibberish happens because the UNO R4 uses 3.3V logic on Serial1 while the MEGA uses 5V. Use a level shifter or voltage divider on the MEGA’s Tx to match 3.3V, keep a common ground, and the communication will work.