pdf-icon

UIFlow Guide

UIFlow 1.0 Blockly

Event

Unit

UIFlow 1.0 Project

DAC

Outputs voltage and raw data.

Example

from m5stack import *
from m5ui import *
from uiflow import *
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)

API

hat_dac_0.setVoltage(1, save=True)
  • Sets the DAC output voltage, with an option to save the current state (save=True).
hat_dac_0.writeData(1, save=True)
  • Sets the DAC output voltage using raw data and saves the state (save=True).
On This Page