1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-03-14 11:29:26 +01:00

Merge branch 'master' of github.com:arduino/Arduino

This commit is contained in:
David A. Mellis 2012-05-21 09:22:59 -07:00
commit 8617afdaa9

View File

@ -11,7 +11,8 @@
* Serial monitor open on Serial port 0: * Serial monitor open on Serial port 0:
created 30 Dec. 2008 created 30 Dec. 2008
by Tom Igoe modified 20 May 2012
by Tom Igoe & Jed Roach
This example code is in the public domain. This example code is in the public domain.
@ -30,4 +31,10 @@ void loop() {
int inByte = Serial1.read(); int inByte = Serial1.read();
Serial.write(inByte); Serial.write(inByte);
} }
// read from port 0, send to port 1:
if (Serial.available()) {
int inByte = Serial.read();
Serial1.write(inByte);
}
} }