Advertisement
Guest User

Untitled

a guest
Sep 19th, 2017
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. /*
  2. Arduino Due + HC-06 (Bluetooth) -echo bluetooth data
  3.  
  4. Serial (Tx/Rx) communicate to PC via USB
  5. Serial3 (Tx3/Rx3) connect to HC-06
  6. HC-06 Rx - Due Tx3
  7. HC-06 Tx - Due Rx3
  8. HC-06 GND - Due GND
  9. HC-06 VCC - Due 3.3V
  10.  
  11. */
  12.  
  13. void setup()
  14. {
  15. delay(1000);
  16. Serial.begin(9600);
  17.  
  18. Serial.write("\nTest Start\n");
  19. }
  20.  
  21. void loop()
  22. {
  23. while(Serial.available())
  24. {
  25. char data = Serial.read();
  26. Serial.write("Voce enviou: " + data);
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement