Guest User

Untitled

a guest
Jul 17th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. byte buff[250];
  2.  
  3. void setup() {
  4. Serial1.begin(9600);
  5. Serial2.begin(9600);
  6. }
  7.  
  8. void loop() {
  9. if(Serial1.available()){
  10. Serial2.write(buff, Serial1.readBytes(buff, Serial1.available()));
  11. }
  12. if(Serial2.available()){
  13. Serial1.write(buff, Serial2.readBytes(buff, Serial2.available()));
  14. }
  15. }
Add Comment
Please, Sign In to add comment