Skip to content

Commit 14f1f79

Browse files
authored
Updated ADC API docs
1 parent 2978a08 commit 14f1f79

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

docs/ADC.rst

+12-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Example::
1313
# The read method returns normalized values from 0 to 1.0
1414
value = ADC.read("P9_40")
1515

16-
# The read_raw returns non-normalized values
16+
# The read_raw returns non-normalized values from 0 to 4095
1717
value = ADC.read_raw("P9_40")
1818

1919
.. module:: Adafruit_BBIO.ADC
@@ -24,13 +24,22 @@ Example::
2424

2525
.. function:: setup_read(channel)
2626

27+
Read the normalized analog value for the channel.
28+
2729
:param str channel: GPIO channel to read the value from (e.g. "P8_16").
30+
:returns: normalized value reading from 0.0 to 1.0
31+
:rtype: float
2832

29-
Read the normalized 0-1.0 analog value for the channel.
3033

3134
.. function:: setup_read_raw(channel)
3235

36+
Read the raw analog value for the channel.
37+
38+
:note: Kernels older than 4.1.x returned a raw value range based on
39+
the reference voltage of 1.8 V–– from 0 to 1800.
40+
3341
:param str channel: GPIO channel to read the value from (e.g. "P8_16").
42+
:returns: raw value reading from 0 to 4095 (12 bits).
43+
:rtype: float
3444

35-
Read the raw analog value for the channel.
3645

0 commit comments

Comments
 (0)