private void InitializeMotionService() { _motionService = new MotionService(); if (_gpioController != null) { _motionService.Initialize(_gpioController); _motionService.MotionEventHandler += HandleMotionEvent; } }