如何使用蓝牙从arduino接收串行数据?

How to receive serial data from arduino using bluetooth?

我是 Arduino 的新手,我对它的了解为 0,而且这是我第一次使用蓝牙编码,所以我想问一下我如何实际从 arduino 接收串行数据并更改我的 android:

我想从 arduino 获取这个值并更改我 android 中的文本视图。所以它将类似于 if (xxx == "11"){ textview.setBackgroundColor(Color.RED);} 但我不知道如何 write/how 获取 arduino 值并在 android.

中声明

你需要一个HC-05蓝牙模块,以及Serial库的使用。 尝试定义一个新的串行端口,然后通过它发送数据。 Arduino代码:

SoftwareSerial btSerial (12, 13); //TX sur 12 et RX sur 13
btSerial.begin(9600);
btSerial.println("Link Started !");