简体   繁体   中英

using Serial Ports in C# Windows 8.1 app

I'm fairly new to C#, and I'm currently working on integrating an Arduino Uno with a Kinect for Windows sensor. I'm building on someone else's work migrating the environment to a Windows 8.1 App, and to the new Kinect sensors released in 2014. I've looked everywhere else on how to integrate serial communication into Windows 8.1 apps, but it appears that it hasn't been done before, or the functionality has not been added to Windows 8.1, evidenced by the error I get when I attempt to add the System.IO.Ports library. So my question is whether this can be worked around or not. I'm using Visual Studio 2013, .NET v4.6, and the target platform is x86. Any more information can be provided on request. Thank you so much!

EDIT on 10/08/15 at 14:03: I've figured out that if I can write a Windows Forms Arduino COM interface and call that from within the 8.1 App when the serial ports need to be initialized or written to, it might work. Am I addressing this correctly? It would be great to know if this was the right way to approach it. Thanks again!

You are basically right, you have to create three apps, win8.1, proxy and serial handler. The resulting app won't be allowed in the windows store.

Here is an example app

Excellent How To here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM