Last active
August 29, 2015 14:14
-
-
Save dmiddlecamp/c11c2031b67ad15efeb6 to your computer and use it in GitHub Desktop.
pipe serial1 -> serial and vice versa
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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