Module ADS1x15 :: Class ADS1115
[hide private]
[frames] | no frames]

Class ADS1115

source code

object --+    
         |    
   ADS1x15 --+
             |
            ADS1115

ADS1115 16-bit analog to digital converter instance.

Instance Methods [hide private]
 
__init__(self, *args, **kwargs)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
_data_rate_default(self)
Retrieve the default data rate for this ADC (in samples per second).
source code
 
_data_rate_config(self, data_rate)
Subclasses should override this function and return a 16-bit value that can be OR'ed with the config register to set the specified data rate.
source code
 
_conversion_value(self, low, high)
Subclasses should override this function that takes the low and high byte of a conversion result and returns a signed integer value.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

    Inherited from ADS1x15
 
_read(self, mux, gain, data_rate, mode)
Perform an ADC read with the provided mux, gain, data_rate, and mode values.
source code
 
_read_comparator(self, mux, gain, data_rate, mode, high_threshold, low_threshold, active_low, traditional, latching, num_readings)
Perform an ADC read with the provided mux, gain, data_rate, and mode values and with the comparator enabled as specified.
source code
 
get_last_result(self)
Read the last conversion result when in continuous conversion mode.
source code
 
readList(self, register, length)
Read a length number of bytes from the specified register.
source code
 
read_adc(self, channel, gain=1, data_rate=None)
Read a single ADC channel and return the ADC value as a signed integer result.
source code
 
read_adc_difference(self, differential, gain=1, data_rate=None)
Read the difference between two ADC channels and return the ADC value as a signed integer result.
source code
 
start_adc(self, channel, gain=1, data_rate=None)
Start continuous ADC conversions on the specified channel (0-3).
source code
 
start_adc_comparator(self, channel, high_threshold, low_threshold, gain=1, data_rate=None, active_low=True, traditional=True, latching=False, num_readings=1)
Start continuous ADC conversions on the specified channel (0-3) with the comparator enabled.
source code
 
start_adc_difference(self, differential, gain=1, data_rate=None)
Start continuous ADC conversions between two ADC channels.
source code
 
start_adc_difference_comparator(self, differential, high_threshold, low_threshold, gain=1, data_rate=None, active_low=True, traditional=True, latching=False, num_readings=1)
Start continuous ADC conversions between two channels with the comparator enabled.
source code
 
stop_adc(self)
Stop all continuous ADC conversions (either normal or difference mode).
source code
 
writeList(self, register, data)
Write bytes to the specified register.
source code
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, *args, **kwargs)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

_data_rate_default(self)

source code 

Retrieve the default data rate for this ADC (in samples per second). Should be implemented by subclasses.

Overrides: ADS1x15._data_rate_default
(inherited documentation)

_data_rate_config(self, data_rate)

source code 

Subclasses should override this function and return a 16-bit value that can be OR'ed with the config register to set the specified data rate. If a value of None is specified then a default data_rate setting should be returned. If an invalid or unsupported data_rate is provided then an exception should be thrown.

Overrides: ADS1x15._data_rate_config
(inherited documentation)

_conversion_value(self, low, high)

source code 

Subclasses should override this function that takes the low and high byte of a conversion result and returns a signed integer value.

Overrides: ADS1x15._conversion_value
(inherited documentation)