蓝牙AT模式
Posted sonny-xby
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了蓝牙AT模式相关的知识,希望对你有一定的参考价值。
void setup() // put your setup code here, to run once: Serial.begin(38400); void sendcmd() Serial.println("AT"); while(Serial.available()) char ch; ch = Serial.read(); Serial.print(ch); // Get response: OK delay(1000); // wait for printing Serial.println("AT+NAME=Sonny"); while(Serial.available()) char ch; ch = Serial.read(); Serial.print(ch); delay(1000); Serial.println("AT+ADDR?"); while(Serial.available()) char ch; ch = Serial.read(); Serial.print(ch); delay(1000); Serial.println("AT+PSWD=2113"); while(Serial.available()) char ch; ch = Serial.read(); Serial.print(ch); delay(1000); /*Serial.println("AT+PSWD?"); while(Serial.available()) char ch; ch = Serial.read(); Serial.print(ch); delay(1000);*/ void loop() sendcmd();
以上是关于蓝牙AT模式的主要内容,如果未能解决你的问题,请参考以下文章