ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • HS-08 아두이노 연결
    아두이노 2017. 10. 13. 12:14

    HS-08 아두이노 연결 


    HC-08 Bluetooth with Arduino 


    # connection 

    HC-08    -      Arduion Uno 

    PIN2 RXD - TXD PIN2

    PIN1 TXD - RXD PIN4 

    PIN12 VCC - 3.3v

    PIN13 GND - GND


    ## command 


    AT Command

    (”x”- parameter)

    Function Default Role

    1 AT Test command - M/S

    2 AT+RX Check the basic parameters - M/S

    3 AT+DEFAULT Restore factory setting - M/S

    4 AT+RESET Reset the module - M/S

    5 AT+VERSION Check version and date - M/S

    6 AT+ROLE=x Change master/slave role S M/S

    7 AT+NAME=xxxxxxxxxxxx Revise name HC-08 M/S

    8 AT+ADDR=xxxxxxxxxxxx Revise address

    Hardware

    address

    M/S

    9 AT+RFPM=x Revise RF power 0(4dBm) M/S

    10 AT+BAUD=x,y Revise UART baud 9600,N M/S

    11 AT+CONT=x Set connectability 0(Can be

    connected)

    M/S

    12 AT+MODE=x Set working mode 0 S

    13 AT+AVDA=xxxxxxxxxxxx Change the broadcast data - S

    14 AT+TIME=x Mode 3 broadcast cycle 5(s) S



    ## Arduino Source Code 


    #include <SoftwareSerial.h>

    SoftwareSerial BT1(4,2);      // RX, TX recorder que se cruzan


    void setup()

       { Serial.begin(9600);

         Serial.println("Enter AT commands:");

         BT1.begin(9600);

       }


    void loop()

       {  if (BT1.available())

              Serial.write(BT1.read());  


          if (Serial.available())

             { char c = Serial.read() ;

               Serial.print(c);

               BT1.print(c);

             }

       }

    '아두이노' 카테고리의 다른 글

    IC-Station MFRC522 Hack custom firmware  (0) 2018.08.11
    아두이노 부트로드 굽기  (0) 2017.11.02
    AVRDUDE 명령어 사용법  (0) 2017.11.01
    Arduino Sleep & Wake up  (0) 2017.10.30
    AVR tip  (0) 2017.10.26
Designed by Tistory.