01 Overview
Read an ADC channel. Oneshot vs continuous depends on IDF version.
- Use when: divider for battery, analog inputs.
- Skip when: metrology accuracy (external ADC).
Sensors and I/O
Battery voltage and analog sensors. Attenuation and calibration matter.
Official path: examples/peripherals/adc
Read an ADC channel. Oneshot vs continuous depends on IDF version.
1. Channel and attenuation.
2. Calibration when the chip supports it.
3. Average samples; convert to volts and filter.
中文
传感器与外设
电池电压、模拟传感器。注意衰减和校准。
官方路径: examples/peripherals/adc
读 ADC 通道。官方 oneshot/continuous 因版本而异。
1. 选通道和衰减。
2. 校准(若芯片支持)。
3. 多次平均。产品要换算成伏特并滤波。