Beispiel #1
0
        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;
        }
Beispiel #2
0
        private async void Connect()
        {
            _arduino = await AutoDiscover.ConnectDevice();

            _arduino.DeviceReady += Arduino_DeviceReady;
        }
Beispiel #3
0
 public void TestMethod1()
 {
     arduino              = AutoDiscover.ConnectDevice().Result;
     arduino.DeviceReady += OnDeviceReady;
 }