Advertisement
Guest User

Untitled

a guest
May 5th, 2015
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.35 KB | None | 0 0
  1. HardwareSerial Uart = HardwareSerial();
  2.  
  3. void setup() {
  4.     Serial.begin(9600);
  5.         Uart.begin(9600);
  6. }
  7.  
  8. void loop() {
  9.         int incomingByte;
  10.        
  11.     if (Serial.available() > 0) {
  12.         incomingByte = Serial.read();
  13.         Uart.write(incomingByte);
  14.     }
  15.     if (Uart.available() > 0) {
  16.         incomingByte = Uart.read();
  17.         Serial.write(incomingByte);
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement