public DigitalValue DigitalRead(DigitalPins pin) { var returnValue = ExecuteFunctionReturnValue("digitalread", pin.ToString()); if (returnValue == SparkClient.ERROR_RETURN_VALUE) { throw new Exception("Failed to read value."); } return(returnValue == DIGITAL_HIGH_RETURN_VALUE ? DigitalValue.High : DigitalValue.Low); }
public DigitalValue DigitalRead(DigitalPins pin) { var returnValue = ExecuteFunctionReturnValue("digitalread", pin.ToString()); if (returnValue == SparkClient.ERROR_RETURN_VALUE) { throw new Exception("Failed to read value."); } return returnValue == DIGITAL_HIGH_RETURN_VALUE ? DigitalValue.High : DigitalValue.Low; }
public int DigitalWrite(DigitalPins pin, DigitalValue pinValue) { var returnValue = ExecuteFunctionReturnValue("digitalwrite", pin.ToString(), pinValue.ToString().ToUpper()); return(returnValue); }
public int DigitalWrite(DigitalPins pin, DigitalValue pinValue) { var returnValue = ExecuteFunctionReturnValue("digitalwrite", pin.ToString(), pinValue.ToString().ToUpper()); return returnValue; }