ADS1x15

class ads1x15.ADS1115(i2c, address=0x49)
gain

Set the gain for all readings.

The following values are possible:

Value Gain Voltage
0 ⅔× 6.144V
1 4.096V
2 2.048V
3 1.024V
4 0.512V
5 16× 0.256V
read(channel)

Read voltage between a channel and GND.

Takes 1ms. Returns a number between 0 and 65535.

diff(channel1, channel2)

Read voltage between two channels.

Takes 1ms. Returns a number between -65536 and 65535.

Only measurements between channels 0 and 1 and between any channel and channel 3 are possible.

alert_start(channel, threshold)

Start continuous measurement, set ALERT pin on threshold.

alert_read()

Get the last reading from the continuous measurement.

class ads1x15.ADS1015(i2c, address=0x48)

Same as :class:ADS1115, but returns 12-bit numbers (0-4095 and -4096-4095).