Com 蓝牙与MSP430G2

Com 蓝牙与MSP430G2,com,bluetooth,serial-port,connection,msp430,Com,Bluetooth,Serial Port,Connection,Msp430,我拿了MSP430G2和蓝牙(JY-MCU蓝牙无线串口模块)。今天我决定试一下,并按照下面解释的方式系好。所有下载的超级和应用程序Android BlueTerm,让应用程序运行,MSP it获得以下程序: char valor=0; void setup() { Serial.begin(9600); } void loop() //Bucle infinito { if (Serial.available())//Si hay una caracter en el buff

我拿了MSP430G2和蓝牙(JY-MCU蓝牙无线串口模块)。今天我决定试一下,并按照下面解释的方式系好。所有下载的超级和应用程序Android BlueTerm,让应用程序运行,MSP it获得以下程序:

char valor=0;

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

void loop()  //Bucle infinito
{
    if (Serial.available())//Si hay una caracter en el buffer serial
    { 
        valor = Serial.read();// Se lee el valor numérico en el puerto serie.
        Serial.print(valor);  
    }
}

连接到蓝牙,当我开始写入时,不会发生任何事情。掉了一块油灰,但什么也没有,什么也没有出现。但是,当两条电缆(TXD)和(RXD)互换时。Putty并运行程序,当我在Putty中写东西时,会出现符号。如果有人能帮忙,那太好了。

我解决了你的问题。他就是这样。我的数字芯片是M430G2553,我编译并上传了M430G2452。这就是问题所在

用于编写所使用的程序代码。让我舒服,因为这是为Arduino写的。当然会去C,但对于初学者来说,我认为这很好

这是一张关于芯片的图片