Skip to content

Commit 60ed473

Browse files
committed
im the worst
1 parent cb72a66 commit 60ed473

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ADS1115/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def readADCSingleEnded(self, channel=0, pga=6144, sps=250):
161161

162162
# Write config register to the ADC
163163
bytes = [(config >> 8) & 0xFF, config & 0xFF]
164-
self.i2c.write_i2c_block_data(self.__ADS1015_REG_POINTER_CONFIG, bytes)
164+
self.i2c.write_i2c_block_data(self.address, self.__ADS1015_REG_POINTER_CONFIG, bytes)
165165

166166
# Wait for the ADC conversion to complete
167167
# The minimum delay depends on the sps: delay >= 1/sps
@@ -170,7 +170,7 @@ def readADCSingleEnded(self, channel=0, pga=6144, sps=250):
170170
time.sleep(delay)
171171

172172
# Read the conversion results
173-
result = self.i2c.readList(self.address, self.__ADS1015_REG_POINTER_CONVERT, 2)
173+
result = self.i2c.read_i2c_block_data(self.address, self.__ADS1015_REG_POINTER_CONVERT, 2)
174174
# Return a mV value for the ADS1115
175175
# (Take signed values into account as well)
176176
val = (result[0] << 8) | (result[1])

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from distutils.core import setup
1212

1313
setup(name='ADS1115',
14-
version='0.1.10',
14+
version='0.1.11',
1515
description='Python library for interacting with the ADS1115 Analog to Digital Converter.',
1616
url='http://github.com/dhhagan/Adafruit-Raspberry-Pi-Python-Code',
1717
author='David H Hagan',

0 commit comments

Comments
 (0)