Arduino和Android之间的蓝牙串行通信问题

Arduino和Android之间的蓝牙串行通信问题,android,bluetooth,arduino,Android,Bluetooth,Arduino,我已经用Java编写了一个Android应用程序,使用Eclipse通过蓝牙向Arduino发送数据 设备似乎连接正常,但当我从Android向Arduino发送数据时,Arduino板上的接收(RX)指示灯不亮 有人能帮忙吗 #define arduinoRx 2 #define arduinoTx 3 int gelen_veri; int LedCikis = 8; SoftwareSerial bluetooth(arduinoRx, arduinoTx); void se

我已经用Java编写了一个Android应用程序,使用Eclipse通过蓝牙向Arduino发送数据

设备似乎连接正常,但当我从Android向Arduino发送数据时,Arduino板上的接收(RX)指示灯不亮

有人能帮忙吗

#define arduinoRx 2
#define arduinoTx 3 
int gelen_veri;
int LedCikis = 8;

SoftwareSerial bluetooth(arduinoRx, arduinoTx);    

void setup() {
    bluetooth.begin(9600);
}

void loop() {
    if (bluetooth.available() > 0) {

        gelen_veri=bluetooth.read();    

        switch (gelen_veri) {

            case 'A' :
                digitalWrite(LedCikis, HIGH);
            break;

            case 'K' :
                digitalWrite(LedCikis, LOW);
            break;

            default:
            break;
        }
    }
}

使用串行rx/tx引脚代替SoftwareSerial。我过去在SoftwareSerial和我的HC-05蓝牙模块方面遇到过问题。

您同意您的设备工作正常还是amdroid代码?不,这是我的另一个问题。我不同意哪个有问题。Arduino代码、android代码或蓝牙设备。我怎么能理解?希尔普