summaryrefslogtreecommitdiff
path: root/docs/zephyr/quickref.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/zephyr/quickref.rst')
-rw-r--r--docs/zephyr/quickref.rst13
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/zephyr/quickref.rst b/docs/zephyr/quickref.rst
index 0e985c70b..64054bf99 100644
--- a/docs/zephyr/quickref.rst
+++ b/docs/zephyr/quickref.rst
@@ -119,6 +119,19 @@ Hardware SPI is accessed via the :ref:`machine.SPI <machine.SPI>` class::
spi.write_readinto(b'abcd', buf) # write to MOSI and read from MISO into the buffer
spi.write_readinto(buf, buf) # write buf to MOSI and read back into the buf
+Analog to Digital Converter (ADC)
+----------------------------------
+
+Use the :ref:`machine.ADC <machine.ADC>` class.
+
+Example of using ADC to read a pin's analog value (the ``zephyr,user`` node must contain
+the ``io-channels`` property containing all the ADC channels)::
+
+ from machine import ADC
+
+ adc = ADC(("adc", 0))
+ adc.read_uv()
+
Disk Access
-----------