pdf-icon

UIFlow Guide

UIFlow 1.0 Blockly

Event

Unit

UIFlow 1.0 Project

Unit Buzzer

Example

from m5stack import *
from m5ui import *
from uiflow import *
import unit

setScreenColor(0x222222)
buzzer_0 = unit.get(unit.BUZZER, unit.PORTB)

buzzer_0.set_buzzer(1)
while True:
  buzzer_0.set_freq(4000)
  wait_ms(2)

API

buzzer_0.set_freq(4000)
  • Set frequency
buzzer_0.set_buzzer(1)
  • Set Unit BUZZER status
On This Page