public IGpioPin CreatePin(BcmPin id, GpioPinDriveMode mode = GpioPinDriveMode.Output) { var pin = new TestGpioPin(id); pin.PinMode = mode; return(pin); }
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); }