Exemple #1
0
        public ShutterRemote(GpioController gpio, IGpioConfiguration gpioConfig, IShutterRemoteConfiguration triggerConfig)
        {
            _gpio          = gpio;
            _gpioConfig    = gpioConfig;
            _triggerConfig = triggerConfig;

            _focusPin = gpio.OpenPin(gpioConfig.FocusPin);
            _focusPin.Write(GpioPinValue.Low);
            _focusPin.SetDriveMode(GpioPinDriveMode.Output);

            _shutterPin = gpio.OpenPin(gpioConfig.ShutterActuationPin);
            _shutterPin.Write(GpioPinValue.Low);
            _shutterPin.SetDriveMode(GpioPinDriveMode.Output);

            _remoteState = ConfigureStateMachine();
        }
Exemple #2
0
 public MotionSensor(GpioController gpio, IGpioConfiguration gpioConfig)
 {
     _gpio       = gpio;
     _gpioConfig = gpioConfig;
 }