March 2018
Beginner to intermediate
410 pages
10h 40m
English
The Arduino is accessed using Firmata. To do that, we use the Windows.Devices.Enumeration, Microsoft.Maker.RemoteWiring, and Microsoft.Maker.Serial namespaces, available in the Windows-Remote-Arduino NuGet. We begin by enumerating all the devices it finds:
DeviceInformationCollection Devices =
await UsbSerial.listAvailableDevicesAsync();
foreach (DeviceInformationDeviceInfo in Devices)
{
If our Arduino device is found, we will have to connect to it using USB:
if (DeviceInfo.IsEnabled&&DeviceInfo.Name.StartsWith("Arduino")) { Log.Informational("Connecting to " + DeviceInfo.Name); this.arduinoUsb = new UsbSerial(DeviceInfo); this.arduinoUsb.ConnectionEstablished += () => Log.Informational("USB connection established."); ...Read now
Unlock full access