Microsoft is betting on Windows 10, finally fulfilling the dream of apps that run on cross-platform platforms. Combined with official Arduino support, you have a powerful new tool at your disposal: the ability to easily create Universal Windows Apps that have a hardware connection to the real world.
Here’s how to get started, even if you’ve never programmed a Windows app before.
Before reading further, check out a demo of what we’re about to do.

I should note that I didn’t use Visual Studio or even touch C# until about 10 years ago. I’m approaching this from the perspective of a fresh install of Visual Studio and have forgotten everything I know.
If you’re already quite experienced with programming Windows apps, or even looking for an easy way to get started programming on Windows without this Arduino, try Ryan’s tutorial on building a simple Visual Basic app. create . Newcomers to absolute programming may want to familiarize themselves with my programming. 101 (and part 2 article).
You must be familiar with some projects (and maybe even read our Arduino Guide), but this is probably the first time you’ve tried to build a real software product to interface with it.
Downloads
First, you need to join the Windows Insider program to get the latest preview Visual Studio 2015 and latest version Windows 10 preview . Do it now — it’s free. Windows 10 is a developer preview and should not be installed as the primary operating system. This is fucking buggy.
- Join the Windows Insider Program and download the Windows 10 Technical Preview.
- Get Visual Studio 2015 Community Edition Preview [больше не доступно].
visual studio is Microsoft’s own development environment that we will use to create a C# application for Windows.
Why C#? With a strong resemblance to Java, it’s a relatively easy programming language for beginners to get up and running with a running app, yet powerful enough to let you create amazing apps (even games: C# — Unity’s scripting language of choice — check out our freebies). eBook, The Beginner’s Guide to Game Programming with Unity).
If you haven’t already, download Arduino IDE from the Arduino.cc official website and install standard boards for a fee. You will find it in the section Examples -> Firm -> Standard Firm . This just turns it into a «dumb» serial device that will do what our application says it will do — there will be no application logic on the board itself, just an interface between our application and any sensors or output devices connected to the Arduino. ,
In terms of wiring, you can either attach an LED directly to pin 13 and GND as shown below, or you can use an onboard LED. You will also need a variable resistor (I used a 10 kΩ linear potentiometer) going into A0 (with matching pins on GND and +5V obviously).
Finally, download the Remote Wiring package from GitHub [Больше не доступно]. This is the layer we need to add in order for our Windows application to communicate with the Arduino.
Create Application
Go ahead and open Visual Studio. If you are running it for the first time, you will be prompted to sign in. If you want, ignore it. Select Visual C# as a design option and continue; Either way, it takes a few minutes to get Visual Studio up and running for the first time.
Create a new project using a template Visual C# -> Blank App (Windows Universal) . I named mine «Arduino Test» but it doesn’t matter.
At this point, I ran into an error about having to switch Windows 10 to developer mode if I really wanted to run the app. Do this though, if you find your build of Windows 10 doesn’t work with this setting, it’s a known bug and you’ll need to use the Group Policy Editor to enable Developer Mode.
Then right click anywhere Solution Explorer (it’s on the right) and select » Add» -> » Existing project» .
Navigate to where you downloaded the Remote Wiring files from Github — if it was unzipped, it should be a folder named remote-wiring-development . Inside you will find Microsoft.Maker.win10 ; and inside that you will find 3 more folders. In turn, add each of them by going to these three folders and locating the project file.
If you’re getting any «XAML 8.2 file not found» error messages, then you have the wrong version of Visual Studio or you haven’t installed the developer tools yet. Go back to the beginning of this article and make sure you have downloaded and installed both of the associated Visual Studio files.
Those 3 projects you just added are just different layers of the Arduino interface. In Solution Explorer, if you right-click and select » Dependencies» -> » Build Dependencies» you can see which layers depend on (on what Serial depends; on Serial depends Firmata ; from both — remotewiring ) . The only change you need to make is to select your project from the drop down list and check the boxes in each box to indicate that your project depends on all these other projects.
Last step: Again in Solution Explorer, right-click on the item » Links» in your project and select » Add link» . On the left go to Windows Universal then check the box next to Microsoft Visual C++ AppLocal Runtime Package . Don’t close the dialogue just yet.
Then go to Projects (also in the same dialog, from the list on the left) and check the box next to each of the three projects Microsoft Maker .