Skip to content
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

Can I use any pins as rx/tx for softwareserial? #12

Closed
ykolerov opened this issue Nov 6, 2019 · 3 comments
Closed

Can I use any pins as rx/tx for softwareserial? #12

ykolerov opened this issue Nov 6, 2019 · 3 comments

Comments

@ykolerov
Copy link

ykolerov commented Nov 6, 2019

Hi, I'm struggling to connect Sim800l to this board. Using arduino environment and tinyGSM via softwareserial (as no hardwareserial is pinned-out and available at this particular board? or?..) Tried different pin pairs as rx/tx with no success.

@lewisxhe
Copy link
Contributor

You only need to specify RX and TX at initialization time, as follows:

Serial1.beign(115200, SERIAL_8N1, 25, 26);

@ykolerov
Copy link
Author

Thanks.
I realized I have to connect modem RST to VCC. Now everything works.

@Eddiiie
Copy link

Eddiiie commented Mar 17, 2021

Hello,
Just want to confirm. I have a project where I need 2 UART ports and also the USB Serial port, total of 3.

I put this test code together but have not uploaded it yet .. There are no errors on compile check!

Should this really work? If so, that is great! It just seems too easy.. Serial, Serial1, Serial2

I also have to level shift this to use one of those TTL serial ports with the DB9 connector, right? They are 5V logic.

void setup() {
 Serial.begin(115200);
   while (!Serial) {}

 Serial1.begin(115200, SERIAL_8N1, 12, 13);
   while (!Serial1) {}

 Serial2.begin(115200, SERIAL_8N1, 2, 15);
   while (!Serial2) {}
}


void loop() {
  // put your main code here, to run repeatedly:
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants