コード例 #1
0
ファイル: MainPage.xaml.cs プロジェクト: patdohere/FreeMoVR
        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();
        }
コード例 #2
0
        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();
        }