rinaldohack

Untitled

Jul 1st, 2019
113
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void setup() {
  2.   // initialize both serial ports:
  3.   Serial.begin(115200);
  4.   Serial1.begin(32150);
  5. }
  6.  
  7. void loop() {
  8.   // read from port 1, send to port 0:
  9.   if (Serial1.available()) {
  10.     int inByte = Serial1.read();
  11.     Serial.write(inByte);
  12.   }
  13.  
  14.   // read from port 0, send to port 1:
  15.   if (Serial.available()) {
  16.     int inByte = Serial.read();
  17.     Serial1.write(inByte);
  18.   }
  19. }
RAW Paste Data