/*
Wokwi Custom UART Chip Echo example
Modified from
https://wokwi.com/projects/333638144389808723
to echo characters received on Serial out Serial2
The chip implements a simple ROT13 letter substitution cipher:
https://en.wikipedia.org/wiki/ROT13
See https://link.wokwi.com/custom-chips-alpha for more info about custom chips
*/
void setup() {
Serial.begin(115200);
Serial1.begin(115200); // Serial1 is connected to the custom chip
Serial1.print("Uryyb, HNEG!");
Serial.println("Data received from UART chip:");
}
void loop() {
if (Serial1.available()) {
Serial.print((char)Serial1.read());
}
if (Serial.available()){
Serial1.print((char)Serial.read());
}
delay(1);
}