• <table id="0ws66"></table>
  • <noscript id="0ws66"><source id="0ws66"></source></noscript>

    通過手機控制藍牙串口模塊與Arduino通訊

    作者:貝殼物聯 | 更新時間:2016-03-17 | 瀏覽量:1881

    通過手機APP向藍牙模塊發送指令,藍牙模塊通過串口將指令傳遞給Arduino開發板,并由Arduino做出反饋,傳遞給手機。

    工具材料

    藍牙模塊正面

    藍牙模塊背面

    實物圖

    藍牙模塊與Arduino連接圖

    接線圖

    藍牙模塊    Arduino開發板

    VCC      5V

    GND       GND

    TXD      RX

    RXD      TX

    藍牙模塊與Arduino接線原理圖

    代碼

    void setup()
    {
     Serial.begin(9600);
    }
     
    void loop()
    {
      while(Serial.available())
       {
         char c=Serial.read();
          if(c=='A')
            {
              Serial.println("HELLO!");
            }
       }
    }

    手機發送指令

    藍牙模塊與手機通訊界面

    至此試驗結束。



    評論:共0條

    返回頂部
    国产综合在线