Created
December 3, 2015 14:24
-
-
Save xeonqq/bd01f04fb03ba5fb92e8 to your computer and use it in GitHub Desktop.
Revisions
-
xeonqq created this gist
Dec 3, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ void tryBT() { delay(20000); led_green_flash(); long baudrates[5] = {9600, 19200, 38400, 57600, 115200}; String inputString=""; for (int i =0; i< 5; i++) { DebugSerial.begin(baudrates[i]); // debug output DebugSerial.println("AT"); while (DebugSerial.available()) { char inChar = (char)DebugSerial.read(); inputString += inChar; } if (inputString == "OK") { LogSerial.printf("found baud: %ld", baudrates[i]); } } }