我需要在程序中使用UUID将此arduino连接到手机中的应用程序。我正在使用HC-05作为蓝牙连接器。我可以将UUID放在arduino板上吗?我尝试在arduino论坛中找到我的问题,但没有任何反应。
谢谢。抱歉,我是这个论坛的新手。
#include <SoftwareSerial.h>
SoftwareSerial BTserial(10, 11); // RX | TX
//UUID uuid("E2C56DB5-DFFB-48D2-B060-D0F5A71096E0");
int sensorPin = A0;
int sensorValue = 0;
void setup() {
BTserial.begin(9600);
//BTserial(uuid);
}
void loop() {
sensorValue = analogRead(sensorPin);
//IMPORTANT: The complete String has to be of the Form: 1234,1234,1234,1234;
//(every Value has to be seperated through a comma (',') and the message has to
//end with a semikolon (';'))
BTserial.print("789789");
BTserial.print(",");
BTserial.print("1234.0");
BTserial.print(",");
BTserial.print("1234 hPa");
BTserial.print(",");
BTserial.print("900 ml/s");
BTserial.print(",");
BTserial.print(sensorValue);
BTserial.print(";");
//message to the receiving device
delay(20);
}
我试图找到库或可以帮助我将此UUID放入代码中的东西。