Skip to content

Instantly share code, notes, and snippets.

@rafacouto
Created November 16, 2014 23:31
Show Gist options
  • Save rafacouto/4209fe46157c40841380 to your computer and use it in GitHub Desktop.
Save rafacouto/4209fe46157c40841380 to your computer and use it in GitHub Desktop.
A bridge to comunicate with an UART connected to Serial1 Arduino
void setup() {
Serial.begin(9600); // Arduino monitor
Serial1.begin(9600); // connected UART
}
void loop() {
while (true) {
while (Serial.available()) Serial1.write(Serial.read());
while (Serial1.available()) Serial.write(Serial1.read());
delay(10);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment