Skip to content

Instantly share code, notes, and snippets.

@dmiddlecamp
Last active August 29, 2015 14:14
Show Gist options
  • Save dmiddlecamp/c11c2031b67ad15efeb6 to your computer and use it in GitHub Desktop.
Save dmiddlecamp/c11c2031b67ad15efeb6 to your computer and use it in GitHub Desktop.
pipe serial1 -> serial and vice versa
SYSTEM_MODE(MANUAL);
void setup() {
Serial.begin(9600);
Serial1.begin(9600);
pinMode(D7, OUTPUT);
}
void loop() {
if (Serial1.available()) {
char c = Serial1.read();
Serial.write(c);
count++;
}
else if (Serial.available()) {
char c = Serial.read();
Serial1.write(c);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment