ADC

预备知识

ADC概念

analog to digital conversion 模拟信号到数字信号的转换

OpenMV3硬件资源

ADC资源 分布图

ADC Doc

ADC ADC ALL

http://docs.openmv.io/library/pyb.ADC.html?highlight=adc

ADC+Timer 定时器, 按照特定频率采样 数据存储在buffer中

视频演示

电源 示波器 视频演示

Read ADC


# Read ADC Example
#
# This example shows how to read the ADC on your OpenMV Cam.
# 此例程展示了如何在OpenMV上读取ADC信号
import time
from pyb import ADC

# Must always be "P6".
# 只能是"P6" OpenMV3资源限制
adc = ADC("P6") 

while(True):
    # The ADC has 12-bits of resolution for 4096 values.
    '''
    ADC取值范围 0-4096
    将value 转换为实际的电压值的公式
    value / 4096 * 3.3
    '''
    print("ADC = %fv" % ((adc.read() * 3.3) / 4095))
    time.sleep(100)
Copyright 杭州云江科技有限公司 2017 all right reserved,powered by Gitbook该文件修订时间: 2018-04-02 09:53:12

results matching ""

    No results matching ""