This method sets the DAC value. It is equivalent to the AT#DAC command.
The first input parameter enable is a Python integer and can assume values 0 or 1. If it is set to 1 enables DAC output otherwise if it is set to 0 disabled DAC output.
The second input parameter value is a Python integer and represents the scale factor of output voltage and can assume values in the range 0-1023.
The return value is a Python integer that has value -1 if an error occurred otherwise it has value 1.
Example:
res = GPIO.setDAC(1, 512)
sets DAC output voltage at half the range, assigning the return value to res.
|
|
Note: For version 18.11.004 the only available value for adcNumber is 1. For version 18.11.004 this method is not available. |