|
本帖最後由 mcsu42 於 2013年7月19日 01:37 AM 編輯
手機跟藍芽接收可以配對但是一直閃燈
進入設定時每次都跑出要輸入PIN碼
multiwii 的藍芽是要加入這些才能使用嗎?
還是藍芽插上就能使用
/*Bluetooth Setup for MultiWii June 2013 V0.1bThis program is free software: you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation, either version 3 of the License, or any later version. see <http://www.gnu.org/licenses/>*/String BTName = "QUAD"; //<-Enter your name hereString PIN = "1234"; //<-Enter your pin herevoid setup() { Serial.begin(9600); BTSet(); Serial.begin(19200); BTSet(); Serial.begin(38400); BTSet(); Serial.begin(57600); BTSet(); Serial.begin(115200); BTSet(); }void BTSet(){ delay(100); Serial.print("AT"); delay(1000); Serial.print("AT+NAME"+BTName); delay(1000); Serial.print("AT+PIN"+PIN); delay(1000); Serial.print("AT+BAUD8"); delay(1000); if(Serial.available()) { digitalWrite(13, HIGH); delay(1000); }}void loop() { digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level) delay(1000); // wait for a second digitalWrite(13, LOW); // turn the LED off by making the voltage LOW delay(1000); }
|
上一篇:請問四軸自旋的問題下一篇:新手玩四軸的..
|