Skip to content

Commit

Permalink
update doc string for value
Browse files Browse the repository at this point in the history
  • Loading branch information
caternuson committed Jun 27, 2024
1 parent f806739 commit 4e8764f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion adafruit_ads1x15/analog_in.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,12 @@ def __init__(

@property
def value(self) -> int:
"""Returns the value of an ADC pin as an integer."""
"""The value on the analog pin between 0 and 65535
inclusive (16-bit). (read-only)
Even if the underlying analog to digital converter (ADC) is
lower resolution, the value is 16-bit.
"""
return self._ads.read(
self._pin_setting, is_differential=self.is_differential
) << (16 - self._ads.bits)
Expand Down

0 comments on commit 4e8764f

Please sign in to comment.