DAC

预备知识

DAC概念

digital to analog conversion

DAC DOC

http://docs.openmv.io/library/pyb.DAC.html?highlight=dac

初始化 分辨率 选择区间8-12位 dac.init(bits=8)

定时器

DAC Control Example

利用DAC 产生呼吸灯的效果

TODO 演示效果视频

# DAC Control Example
#
# This example shows how to use the DAC pin output onboard your OpenMV Cam.

import time
from pyb import DAC

# Must always be "P6".
# 智能使用"P6"引脚
dac = DAC("P6") 

while(True):
    # The DAC has 8-12 bits of resolution (default 8-bits).
    for i in range(256):
        dac.write(i)
        time.sleep(20)
    for i in range(256):
        dac.write(255-i)
        time.sleep(20)
Copyright 杭州云江科技有限公司 2017 all right reserved,powered by Gitbook该文件修订时间: 2018-04-02 09:53:12

results matching ""

    No results matching ""