Module PCF8591 :: Class ADC
[hide private]
[frames] | no frames]

Class ADC

source code

Instance Methods [hide private]
 
__init__(self, channel, address=0x48)
Creates an instance of the chip at given i2c address.
source code
 
getValue(self)
Reads the specified channel and returns the value (0..255).
source code
Method Details [hide private]

__init__(self, channel, address=0x48)
(Constructor)

source code 

Creates an instance of the chip at given i2c address.

Parameters:
  • bus - the SMBus instance to access the i2c port (0 or 1).
  • channel - the channel to read (0..3)
  • address - the address of the i2c chip (default: 0x48)

getValue(self)

source code 

Reads the specified channel and returns the value (0..255). @return the byte value or None, if an error occurred