SHARE
TWEET

Untitled

a guest Apr 24th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <SoftwareSerial.h>
  2. SoftwareSerial mySerial(5, 4); // RX, TX
  3.  
  4. void setup() {
  5.   Serial.begin(38400);
  6.   while (!Serial) { }
  7.   Serial.println("Serial");
  8.   mySerial.begin(38400);
  9.   mySerial.println("Soft serial");
  10. }
  11.  
  12. void loop() {
  13.   if (mySerial.available()) {
  14.   Serial.write(mySerial.read());
  15.   }
  16.  
  17.   if (Serial.available()) {
  18.   mySerial.write(Serial.read());
  19.   }
  20. }
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