We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3258d2c + c3a9b30 commit 8617afdCopy full SHA for 8617afd
build/shared/examples/4.Communication/MultiSerialMega/MultiSerialMega.ino
@@ -11,7 +11,8 @@
11
* Serial monitor open on Serial port 0:
12
13
created 30 Dec. 2008
14
- by Tom Igoe
+ modified 20 May 2012
15
+ by Tom Igoe & Jed Roach
16
17
This example code is in the public domain.
18
@@ -30,4 +31,10 @@ void loop() {
30
31
int inByte = Serial1.read();
32
Serial.write(inByte);
33
}
34
+
35
+ // read from port 0, send to port 1:
36
+ if (Serial.available()) {
37
+ int inByte = Serial.read();
38
+ Serial1.write(inByte);
39
+ }
40
0 commit comments