Tag: serial communication

C#控制台应用程序通过蓝牙与Arduino交谈

除了这个不起作用之外,在这里说的不多,我不知道为什么。 Arduino上的串行输出什么都没有。 C#代码的输出结果是等待响应然后什么都没有。 当我启动C#程序时,Arduino上的蓝牙卡LED变为绿色,因此正在建立连接。 别无其他。 Arduino代码 #include //Software Serial Port #define RxD 8 // This is the pin that the Bluetooth (BT_TX) will transmit to the Arduino (RxD) #define TxD 7 // This is the pin that the Bluetooth (BT_RX) will receive from the Arduino (TxD) SoftwareSerial blueToothSerial(RxD,TxD); boolean light = false; void setup(){ Serial.begin(9600); […]