0
我試圖建立一個連接來控制一個Windows Phone 10,HC-05藍牙模塊和na Arduino Uno的LED。使用藍牙模塊時,我無法讓LED響應,只有在連接直接槽USB時。windows 10和藍牙模塊hc-05的密碼
的HC-05採用的是密碼,我只是找不到如何通過對API的密碼
我使用Visual Studio中的代碼是:
//on the constructor:
connection = new BluetoothSerial("HC-05");
arduino = new RemoteDevice(connection);
connection.ConnectionEstablished += onConnectionStablished;
connection.begin(38400, SerialConfig.SERIAL_8N1);
//on the buttons:
private void OnButton_Click(object sender, RoutedEventArgs e)
{
//turn the led on pin 5 on
arduino.digitalWrite(9, PinState.HIGH);
}