pdf-icon

UIFlow 上手教程

UiFlow1 Blockly

Event

Unit

UiFlow1 项目配置

Hat DAC2

输出读取的电压值

案例程序

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

setScreenColor(0x111111)

hat_dac2_0 = hat.get(hat.DAC2)

hat_dac2_0.setDACOutputVoltageRange(hat_dac2_0.RANGE_5V)

功能说明

hat_dac2_0.setDACOutputVoltageRange(hat_dac2_0.RANGE_5V)
  • 设置 DAC 输出电压范围,当前选择为 RANGE_5V
hat_dac2_0.setVoltage(5, channel=hat_dac2_0.CHANNEL_0)
  • 为 Channel 0 设置输出电压为 5V
hat_dac2_0.setVoltageBoth(5, 5)
  • 同时为 Channel 0 和 Channel 1 设置输出电压,均为 5V
On This Page
案例程序
功能说明
Q&A
Submit a question
Select question category*
Arduino
MicroPython
UIFlow1
UIFlow2
EzData
M5Burner
Software
Hardware
Other
Product name
Product version
Question description*
(Supports pasting screenshots.)
Attachments
Add Files
Email*
Submit
OK

M5Stack Support

Hi, this is M5Stack Support. How can I help you today?