Advertisement
ArduinoCz

24 - software serial

Aug 26th, 2013
14,917
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.37 KB | None | 0 0
  1. #include <SoftwareSerial.h>
  2.  
  3. // inicializace ser. portu na 2 a 3 pinu
  4. //SoftwareSerial(RX, TX);
  5. SoftwareSerial Bluetooth =  SoftwareSerial(2, 3);
  6.  
  7.  
  8. void setup() {
  9.   Bluetooth.begin(9600); // inicializace seriové linky
  10.   delay(500);// čekej 0,5 sec  
  11. }
  12.  
  13. void loop() {
  14. Bluetooth.println("ahoj"); // odešli na ser. linku ahoj
  15. delay(2000);  //čekej 2 sec
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement