Skip to content

Commit

Permalink
Merge pull request #31 from dherrada/master
Browse files Browse the repository at this point in the history
Value for ADS1015 has been scaled to 16 bits
  • Loading branch information
tannewt authored May 9, 2019
2 parents 5ba760c + 50061b7 commit e439d7e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion adafruit_ads1x15/analog_in.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ def __init__(self, ads, positive_pin, negative_pin=None):
@property
def value(self):
"""Returns the value of an ADC pin as an integer."""
return self._ads.read(self._pin_setting, is_differential=self.is_differential)
return self._ads.read(self._pin_setting,
is_differential=self.is_differential) << (16 - self._ads.bits)

@property
def voltage(self):
Expand Down

0 comments on commit e439d7e

Please sign in to comment.