-**addr** is the address of the device, defaults to 72 (0x48).
-**enable_out** is for setting "ANALOG OUTPUT ENABLE FLAG". Also enables the internal oscillator which is a must for auto-increment. Valid options are: (`True`, `False`). Defaults to `True`.
-**in_program** is for settings "ANALOG INPUT PROGRAMMING". Valid options are: (`AINPRG0`, `AINPRG1`, `AINPRG2`, `AINPRG3`). Defaults to `AINPRG0`.
####set_out(enable_out):
#### set_out(enable_out):
_Sets the output flag_
-**enable_out** is for setting "ANALOG OUTPUT ENABLE FLAG". Also enables the internal oscillator which is a must for auto-increment. Valid options are: (`True`, `False`).
####set_program(in_program):
#### set_program(in_program):
_Sets the input program_
-**in_program** is for settings "ANALOG INPUT PROGRAMMING". Valid options are: (`AINPRG0`, `AINPRG1`, `AINPRG2`, `AINPRG3`).
####read(channel=...):
#### read(channel=...):
_Reads analog data from the device. When auto incrementing is enabled, this function will return all four inputs as a list, otherwise returns a single integer._
-**channel** is for setting the "A/D CHANNEL NUMBER". When is None, auto incrementing will be enabled. Valid options are(`ACHNNL0`, `ACHNNL1`, `ACHNNL2`, `ACHNNL3`, `None`). Defaults to `None`.
####write(value):
#### write(value):
_Writes analog data to the device. It'll automatically enable analog out._
-**value** is for setting the analog output value of the device. Valid options are: (`0-255`)
###Constants
### Constants
-**AINPRG0**: ANALOG INPUT PROGRAM 0
-**AINPRG1**: ANALOG INPUT PROGRAM 1
-**AINPRG2**: ANALOG INPUT PROGRAM 2
...
...
@@ -43,6 +58,7 @@ _Writes analog data to the device. It'll automatically enable analog out._
-**ACHNNL3**: ANALOG CHANNEL 3
## Development
As you can guess, there are no tests whatsoever, no coverage, nothing!
You can create a distribution package by running this command inside pcf8591 directory.