Skip to content

Commit 8617afd

Browse files
committed
Merge branch 'master' of github.com:arduino/Arduino
2 parents 3258d2c + c3a9b30 commit 8617afd

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

build/shared/examples/4.Communication/MultiSerialMega/MultiSerialMega.ino

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
* Serial monitor open on Serial port 0:
1212
1313
created 30 Dec. 2008
14-
by Tom Igoe
14+
modified 20 May 2012
15+
by Tom Igoe & Jed Roach
1516
1617
This example code is in the public domain.
1718
@@ -30,4 +31,10 @@ void loop() {
3031
int inByte = Serial1.read();
3132
Serial.write(inByte);
3233
}
34+
35+
// read from port 0, send to port 1:
36+
if (Serial.available()) {
37+
int inByte = Serial.read();
38+
Serial1.write(inByte);
39+
}
3340
}

0 commit comments

Comments
 (0)