コード例 #1
0
        public IGpioPin CreatePin(BcmPin id, GpioPinDriveMode mode = GpioPinDriveMode.Output)
        {
            var pin = new TestGpioPin(id);

            pin.PinMode = mode;
            return(pin);
        }
コード例 #2
0
 public WaterControllerContext(string id, BcmPin pin, double litersPerSecond)
 {
     TimeProvider    = new TestTimeProvider();
     GpioPin         = new TestGpioPin(pin);
     GpioPin.PinMode = GpioPinDriveMode.Output;
     GpioPin.Write(WaterController.PIN_OFF);
     WaterController = new WaterController(id, new LoggerFactory(), GpioPin, litersPerSecond, TimeProvider);
 }