[英]how can i connect arduino uno to rasberry pi 3 using usb cable as serial port in windows iot using c#
using System;
using System.IO.Ports;
namespace sampleserialport
{
public sealed partial class MainPage : Page
{
public MainPage()
{
this.InitializeComponent();
string[] ports = SerialPort.GetPortNames();
Console.WriteLine("The following serial ports were found:");
// Display each port name to the console.
foreach(string port in ports)
{
Console.WriteLine(port);
}
Console.ReadLine();
}
}
}
這是正在使用的代碼,但在行中出現錯誤
string[] ports = SerialPort.GetPortNames();
作為
System.PlatformNotSupportedException: '當前平台不支持枚舉串行端口名稱。'
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.