aboutsummaryrefslogtreecommitdiff
path: root/libraries/SoftwareSerial/examples
diff options
context:
space:
mode:
authorSandeep Mistry <s.mistry@arduino.cc>2016-04-04 10:00:47 -0400
committerSandeep Mistry <s.mistry@arduino.cc>2016-04-04 10:00:47 -0400
commit2fa23a24864333c0f44af381e1c3380a4ee60047 (patch)
tree9cda5e0f51d318920ed8008453cac7be6b997576 /libraries/SoftwareSerial/examples
parent9eac8362743c27e16bed3ca4ca74bd7e84a5348b (diff)
parent15f17aa06c99035bd9eb901bda2fc4d46f042f3d (diff)
Merge pull request #4716 from asukiaaa/master
Corrected comments of rx and tx in a SoftwareSerial example.
Diffstat (limited to 'libraries/SoftwareSerial/examples')
-rw-r--r--libraries/SoftwareSerial/examples/TwoPortReceive/TwoPortReceive.ino10
1 files changed, 5 insertions, 5 deletions
diff --git a/libraries/SoftwareSerial/examples/TwoPortReceive/TwoPortReceive.ino b/libraries/SoftwareSerial/examples/TwoPortReceive/TwoPortReceive.ino
index 26659d6..8d7f93e 100644
--- a/libraries/SoftwareSerial/examples/TwoPortReceive/TwoPortReceive.ino
+++ b/libraries/SoftwareSerial/examples/TwoPortReceive/TwoPortReceive.ino
@@ -13,8 +13,8 @@
The circuit:
Two devices which communicate serially are needed.
- * First serial device's TX attached to digital pin 2, RX to pin 3
- * Second serial device's TX attached to digital pin 4, RX to pin 5
+ * First serial device's TX attached to digital pin 10(RX), RX to pin 11(TX)
+ * Second serial device's TX attached to digital pin 8(RX), RX to pin 9(TX)
Note:
Not all pins on the Mega and Mega 2560 support change interrupts,
@@ -26,7 +26,7 @@
8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI).
created 18 Apr. 2011
- modified 25 May 2012
+ modified 19 March 2016
by Tom Igoe
based on Mikal Hart's twoPortRXExample
@@ -35,10 +35,10 @@
*/
#include <SoftwareSerial.h>
-// software serial #1: TX = digital pin 10, RX = digital pin 11
+// software serial #1: RX = digital pin 10, TX = digital pin 11
SoftwareSerial portOne(10, 11);
-// software serial #2: TX = digital pin 8, RX = digital pin 9
+// software serial #2: RX = digital pin 8, TX = digital pin 9
// on the Mega, use other pins instead, since 8 and 9 don't work on the Mega
SoftwareSerial portTwo(8, 9);