public void SetDigitalPinState(byte pin, InteractClient.Arduino.Arduino.PinState state) { if (disabledPins.Contains(pin)) { Network.Sender.WriteLog("Arduino: Pin " + (int)pin + " is disabled."); return; } if (arduino.getPinMode(pin) != PinMode.OUTPUT) { Network.Sender.WriteLog("Arduino: Pin " + (int)pin + " is not in output mode."); return; } PinState ps = Convert(state); arduino.digitalWrite(pin, ps); }
private PinState Convert(InteractClient.Arduino.Arduino.PinState state) { return((PinState)state); }