pdf-icon

UIFlow Guide

UIFlow 1.0 Blockly

Event

Unit

UIFlow 1.0 Project

Finger

案例程序

串口打印指纹的id,权限和识别状态

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

setScreenColor(0x111111)

hat_Finger_0 = hat.get(hat.FINGER)

hat_Finger_0.addUser(1, 1)
while True:
  print(hat_Finger_0.state)
  print(user_id)
  print(access)
  wait_ms(2)

功能说明

hat_Finger_0.addUser(1, 1)
  • 添加用户指纹ID,并指定访问权限
hat_Finger_0.readFingerCb(callback=hat_Finger_0_cb)
  • 获取未知用户的状态
access
  • 获取指纹用户的访问权限信息

  • 获取指纹用户的ID
user_id
  • 获取指纹识别模块的状态
hat_Finger_0.state
  • 读取具有特定ID和访问权限的用户信息
hat_Finger_0.removeAllUser()
  • 删除所有已存储的用户数据
hat_Finger_0.removeUser(1)
  • 删除指定ID的指纹用户
On This Page