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