pdf-icon

UIFlow Guide

UIFlow 1.0 Blockly

Event

Unit

UIFlow 1.0 Project

DAC

输出电压值和原始数值

案例程序

from m5stack import *
from m5ui import *
from uiflow import *
import hat
import hat

setScreenColor(0x111111)

hat_dac_0 = hat.get(hat.DAC)

hat_dac_0.setVoltage(1,save=True)
hat_dac_0.writeData(1,save=True)

功能说明

hat_dac_0.setVoltage(1,save=True)
  • 设置 DAC 输出电压,可以保存当前状态,保存选项为 True
hat_dac_0.writeData(1,save=True)
  • 使用原始数据设置 DAC 输出电压,并保存状态,保存选项为 True
On This Page