public Relay(H.Cpu.Pin pin, RelayType type = RelayType.NormallyOpen) { // if it's normally closed, we have to invert the "on" value this.Type = type; if (this.Type == RelayType.NormallyClosed) { _onValue = false; } // create a digital output port shim DigitalOut = new GPIO.SPOT.DigitalOutputPort(pin, !_onValue); }
/// <summary> /// Creates a LED through a pin directly from the Digital IO of the Netduino /// </summary> /// <param name="pin"></param> public Led(H.Cpu.Pin pin) { DigitalOut = new GPIO.SPOT.DigitalOutputPort(pin, !_onValue); }