pdf-icon

UIFlow Guide

UIFlow 1.0 Blockly

Event

Unit

UIFlow 1.0 Project

Mini Joyc

案例程序

设置通讯地址,获取电位器的X,Y原始数值和按键的初始状态值

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

setScreenColor(0x111111)

hat_mini_joyc_0 = hat.get(hat.MINI_JOYC)

hat_mini_joyc_0.init_i2c_address(0x54)
while True:
  print(hat_mini_joyc_0.get_adc12_raw(0))
  print(hat_mini_joyc_0.get_adc12_raw(1))
  print(hat_mini_joyc_0.get_button_status())
  wait_ms(2)

功能说明


  • uiflow_block_hat_minijoyc_init

  • uiflow_block_hat_minijoyc_get_10bit_value

  • uiflow_block_hat_minijoyc_get_8bit_value

  • uiflow_block_hat_minijoyc_get_button_status

  • uiflow_block_hat_minijoyc_get_device_status

  • uiflow_block_hat_minijoyc_get_offset_value

  • uiflow_block_hat_minijoyc_get_raw_value

  • uiflow_block_hat_minijoyc_set_i2c_address

  • uiflow_block_hat_minijoyc_set_led_rgb

  • uiflow_block_hat_minijoyc_set_offset_value
On This Page