예제 #1
0
        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);
        }
예제 #2
0
 private PinState Convert(InteractClient.Arduino.Arduino.PinState state)
 {
     return((PinState)state);
 }