File tree 1 file changed +12
-3
lines changed
1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ Example::
13
13
# The read method returns normalized values from 0 to 1.0
14
14
value = ADC.read("P9_40")
15
15
16
- # The read_raw returns non-normalized values
16
+ # The read_raw returns non-normalized values from 0 to 4095
17
17
value = ADC.read_raw("P9_40")
18
18
19
19
.. module :: Adafruit_BBIO.ADC
@@ -24,13 +24,22 @@ Example::
24
24
25
25
.. function :: setup_read(channel)
26
26
27
+ Read the normalized analog value for the channel.
28
+
27
29
: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
28
32
29
- Read the normalized 0-1.0 analog value for the channel.
30
33
31
34
.. function :: setup_read_raw(channel)
32
35
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
+
33
41
: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
34
44
35
- Read the raw analog value for the channel.
36
45
You can’t perform that action at this time.
0 commit comments