private async void TheButton_Click(object sender, RoutedEventArgs e) { initialize.IsEnabled = false; stopButton.IsEnabled = true; acc = new Accelerometer(); acc.SensorValueChanged += SensorValueChanged; await acc.Initialize(); await acc.EnableSensor(); await acc.SetReadPeriod(10); await acc.EnableNotifications(); }
private async void btnEnableNotifications_Click(object sender, RoutedEventArgs e) { await acc.EnableNotifications(); await gyro.EnableNotifications(); await hum.EnableNotifications(); await ks.EnableNotifications(); await mg.EnableNotifications(); await ps.EnableNotifications(); await tempSen.EnableNotifications(); }