ADC

This example is a simple ADC sample. In this example F1 Starter Kit pin A1 (i.e. F1 smart module pin P17) is set to be used for ADC.

from machine import ADC
from machine import Pin
adc = ADC(Pin(Pin.17))
adc.read_u16() #read the adc analog raw value which is mapped to the range of 0 - 65535 discrete values
adc.read_uv() #read the adc analog value in microvolt