private async Task Connect() { await Log("Connecting to device..."); arduino = await AutoDiscover.ConnectDevice(); if (arduino == null) { await Log("Device not found."); } arduino.DeviceReady += Arduino_DeviceReady; arduino.DeviceConnectionFailed += Arduino_DeviceConnectionFailed; arduino.DeviceConnectionLost += Arduino_DeviceConnectionLost; arduino.DigitalPinUpdated += Arduino_DigitalPinUpdated; arduino.AnalogPinUpdated += Arduino_AnalogPinUpdated; }
private async void Connect() { _arduino = await AutoDiscover.ConnectDevice(); _arduino.DeviceReady += Arduino_DeviceReady; }
public void TestMethod1() { arduino = AutoDiscover.ConnectDevice().Result; arduino.DeviceReady += OnDeviceReady; }