Skip to content

Commit 2bb1050

Browse files
committed
Value for ads1015 has been scaled to 16 bits
1 parent 5ba760c commit 2bb1050

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_ads1x15/analog_in.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def __init__(self, ads, positive_pin, negative_pin=None):
7070
@property
7171
def value(self):
7272
"""Returns the value of an ADC pin as an integer."""
73-
return self._ads.read(self._pin_setting, is_differential=self.is_differential)
73+
return self._ads.read(self._pin_setting, is_differential=self.is_differential) << (16 - self._ads.bits)
7474

7575
@property
7676
def voltage(self):

0 commit comments

Comments
 (0)