private async void Page_Loaded(object sender, RoutedEventArgs e) { try { await CloudHelper.InitClientAsync(this); } catch (Exception ex) { string s = ex.Message; } SerialHelper serialHelper = new SerialHelper(this); // connect to arduino and start listening to data serialHelper.ConnectToArduino(); }