private async void InitializeSensors() { try { //s = new Devices.Servo2(pinNumber: 5, minPulseWidth: 0.7 ,maxPulseWidth: 2.6); s = new Devices.Servo(pinNumber: 5, minPulseWidth: 0.7, maxPulseWidth: 2.6); s_1.Minimum = 0; s_1.Maximum = s.MAX_ANGLE; await s.InitializeAsync(); } catch (Exception ex) { throw new Exception("Initialization has failed: " + ex); } }