SHARE
TWEET

Untitled

rinaldohack Jul 23rd, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. #include <SoftwareSerial.h>
  3.  
  4. SoftwareSerial mySerial(10, 11); // RX, TX
  5.  
  6. void setup() {
  7.   // Open serial communications and wait for port to open:
  8.   Serial.begin(115200);
  9.   while (!Serial) {
  10.     ; // wait for serial port to connect. Needed for native USB port only
  11.   }
  12.  
  13.  
  14.   Serial.println("Goodnight moon!");
  15.  
  16.   // set the data rate for the SoftwareSerial port
  17.   mySerial.begin(115200);
  18. }
  19.  
  20. void loop() { // run over and over
  21.   if (mySerial.available()) {
  22.     Serial.write(mySerial.read());
  23.   }
  24.   if (Serial.available()) {
  25.     mySerial.write(Serial.read());
  26.   }
  27. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top