pdf-icon

UIFlow Guide

UIFlow 1.0 Blockly

Event

Unit

UIFlow 1.0 Project

Module Plus

案例程序

from m5stack import *
from m5ui import *
from uiflow import *
import module

setScreenColor(0x222222)

plus = module.get(module.PLUS)

while True:
  print((str('Encoder') + str((plus.get_encode()))))
  print((str('Button') + str((plus.get_press()))))
  wait_ms(2)

功能说明

plus.clean_encode()
  • 清除编码器的当前编码值,将其复位为零
plus.get_encode()
  • 获取当前编码器的编码值。返回的值是编码器的当前位置值
plus.get_press()
  • 获取按键的按压状态。返回的值表示当前按键是否被按下
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