Skip to content

Commit 2fa23a2

Browse files
committed
Merge pull request #4716 from asukiaaa/master
Corrected comments of rx and tx in a SoftwareSerial example.
2 parents 9eac836 + 15f17aa commit 2fa23a2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

libraries/SoftwareSerial/examples/TwoPortReceive/TwoPortReceive.ino

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
1414
The circuit:
1515
Two devices which communicate serially are needed.
16-
* First serial device's TX attached to digital pin 2, RX to pin 3
17-
* Second serial device's TX attached to digital pin 4, RX to pin 5
16+
* First serial device's TX attached to digital pin 10(RX), RX to pin 11(TX)
17+
* Second serial device's TX attached to digital pin 8(RX), RX to pin 9(TX)
1818
1919
Note:
2020
Not all pins on the Mega and Mega 2560 support change interrupts,
@@ -26,7 +26,7 @@
2626
8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI).
2727
2828
created 18 Apr. 2011
29-
modified 25 May 2012
29+
modified 19 March 2016
3030
by Tom Igoe
3131
based on Mikal Hart's twoPortRXExample
3232
@@ -35,10 +35,10 @@
3535
*/
3636

3737
#include <SoftwareSerial.h>
38-
// software serial #1: TX = digital pin 10, RX = digital pin 11
38+
// software serial #1: RX = digital pin 10, TX = digital pin 11
3939
SoftwareSerial portOne(10, 11);
4040

41-
// software serial #2: TX = digital pin 8, RX = digital pin 9
41+
// software serial #2: RX = digital pin 8, TX = digital pin 9
4242
// on the Mega, use other pins instead, since 8 and 9 don't work on the Mega
4343
SoftwareSerial portTwo(8, 9);
4444

0 commit comments

Comments
 (0)