Created
November 29, 2020 08:58
-
-
Save nazt/00588f926c90f833a2329975c9917f71 to your computer and use it in GitHub Desktop.
test-nbiot.ino
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define RXD2 26 | |
#define TXD2 27 | |
void setup() { | |
Serial.begin(115200); | |
//Serial1.begin(9600, SERIAL_8N1, RXD2, TXD2); | |
Serial2.begin(9600, SERIAL_8N1, RXD2, TXD2); | |
pinMode(17, OUTPUT); | |
digitalWrite(17, LOW); | |
delay(50); | |
digitalWrite(17, HIGH); | |
delay(50); | |
digitalWrite(17, LOW); | |
Serial.println("Serial Txd is on pin: " + String(TX)); | |
Serial.println("Serial Rxd is on pin: " + String(RX)); | |
} | |
void loop() { //Choose Serial1 or Serial2 as required | |
while (Serial2.available()) { | |
Serial.print(char(Serial2.read())); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment