openmv/scripts/examples/09-OpenMV-Boards/00-Board-Control/adc_read_int_channel.py
2023-07-05 19:03:37 +02:00

12 lines
248 B
Python

# ADC Internal Channels Example
#
# This example shows how to read internal ADC channels.
import pyb
adc = pyb.ADCAll(12)
print(
"VREF = %.1fv VREF = %.1fv Temp = %d"
% (adc.read_core_vref(), adc.read_core_vbat(), adc.read_core_temp())
)