@Override public PinState getState(Pin pin) { super.getState(pin); // return pin state PinState state = null; int ret = com.pi4j.wmtgpio.Gpio.digitalRead(pin.getAddress()); if (ret >= 0) { state = PinState.getState(ret); } return state; }
@Override public void setState(Pin pin, PinState state) { super.setState(pin, state); com.pi4j.wmtgpio.Gpio.digitalWrite(pin.getAddress(), state.getValue()); }