Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update software-serial.md #628

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
moof-moof wants to merge 1 commit into arduino:main from moof-moof:patch-1
Closed

Conversation

Copy link

@moof-moof moof-moof commented Nov 3, 2022
edited
Loading

Under the heading "Limitations of This Library" the article correctly states:

"Not all pins on the Mega and Mega 2560 boards support change interrupts, so only the following can be used for RX: 10, 11, 12, 13, 14, 15, 50, 51, 52, 53, A8 (62), A9 (63), A10 (64), A11 (65), A12 (66), A13 (67), A14 (68), A15 (69). Not all pins on the Leonardo and Micro boards support change interrupts, so only the following can be used for RX: 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI)."

Below this however, in the method example that shows how to create an instance of a SoftwareSerial object, the code reads thus:

#include <SoftwareSerial.h>
const byte rxPin = 2;
const byte txPin = 3;
// Set up a new SoftwareSerial object
SoftwareSerial mySerial (rxPin, txPin);

What This PR Changes

I don't think pins 2 and 3 have been possible to use since the original and very different SoftwareSerial library version by Mellis from more than a decade ago. So rxPin should be corrected to 10, and txPin to 11, in line with the rest of the examples.

Contribution Guidelines

Under the heading "Limitations of This Library" the article correctly states:
"Not all pins on the Mega and Mega 2560 boards support change interrupts, so only the following can be used for RX: 10, 11, 12, 13, 14, 15, 50, 51, 52, 53, A8 (62), A9 (63), A10 (64), A11 (65), A12 (66), A13 (67), A14 (68), A15 (69). Not all pins on the Leonardo and Micro boards support change interrupts, so only the following can be used for RX: 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI)."
Below this however, in the method example that shows how to create an instance of a SoftwareSerial object, the code reads thus:
#include <SoftwareSerial.h>
const byte rxPin = 2;
const byte txPin = 3;
// Set up a new SoftwareSerial object
SoftwareSerial mySerial (rxPin, txPin);
I don't think pins 2 and 3 have been possible to use since the original and very different SoftwareSerial library version by Mellis from more than a decade ago.
Copy link

CLAassistant commented Nov 3, 2022
edited
Loading

CLA assistant check
All committers have signed the CLA.

const byte rxPin = 2;
const byte txPin = 3;
// const byte rxPin = 2; // Obsolete example
Copy link
Contributor

@karlsoderby karlsoderby Dec 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// const byte rxPin = 2; // Obsolete example

const byte txPin = 3;
// const byte rxPin = 2; // Obsolete example
const byte rxPin = 10
// const byte txPin = 3; // Obsolete example
Copy link
Contributor

@karlsoderby karlsoderby Dec 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// const byte txPin = 3; // Obsolete example

Copy link
Contributor

@karlsoderby karlsoderby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @moof-moof , thank you for the submission. I made a suggestion for removing the commented out pin assignments. I don't think there's a need to keep them.

@jhansson-ard jhansson-ard added maker community Bugs and fixes suggested by the community labels Apr 20, 2023
Copy link
Contributor

@karlsoderby please check your suggestions if they are still valid, commit them and merge this PR if possible. Thank you! ⭐

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@karlsoderby karlsoderby karlsoderby requested changes

Labels
community Bugs and fixes suggested by the community maker
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /