openmv/scripts/examples/50-Arduino-Boards/Nicla-Vision/50-Board-Control/adc_read_int_channel.py
iabdalkader 98a29e0870 scripts/examples: Update examples.
- Add examples index.
- Remove RP2040's Bluetooth examples.
- Resort examples.
2023-10-29 21:21:55 +01:00

16 lines
411 B
Python

# This work is licensed under the MIT license.
# Copyright (c) 2013-2023 OpenMV LLC. All rights reserved.
# https://github.com/openmv/openmv/blob/master/LICENSE
#
# ADC Internal Channels Example
#
# This example shows how to read internal ADC channels.
import pyb
adc = pyb.ADCAll(12)
print(
"VREF = %.1fv VBAT = %.1fv Temp = %d"
% (adc.read_core_vref(), adc.read_core_vbat(), adc.read_core_temp())
)