Guest User

Untitled

a guest
Jan 19th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. SoftwareSerial mySerial(10, 11); // RX, TX
  2.  
  3. void setup() {
  4.  
  5. Serial.begin(9600);
  6. while (!Serial) {
  7. ;
  8. }
  9.  
  10.  
  11. Serial.println("Goodnight moon!");
  12.  
  13.  
  14. mySerial.begin(115200);
  15. mySerial.println("Hello, world?");
  16.  
  17. }
  18.  
  19. void loop() {
  20. if (mySerial.available()) {
  21. Serial.write(mySerial.read());
  22. }
  23.  
  24. if (Serial.available()) {
  25. mySerial.write(Serial.read());
  26. }
  27.  
  28.  
  29. }
Add Comment
Please, Sign In to add comment