private void InitializeSensor()
 {
     motionSensor = MotionSensorFactory.Create();
     motionSensor.InitGPIO();
     motionSensor.MotionDetected   += MotionSensor_MotionDetected;
     motionSensor.MotionUndetected += MotionSensor_MotionUndetected;
 }
示例#2
0
        private void SetupMotionSensor()
        {
            motionDetectionResults   = new MotionDetectionResult();
            MotionStatus.DataContext = motionDetectionResults;

            motionSensor = MotionSensorFactory.Create();
            motionSensor.InitGPIO();
            motionSensor.MotionDetected   += MotionSensor_MotionDetected;
            motionSensor.MotionUndetected += MotionSensor_MotionUndetected;
        }