pdf-icon

UIFlow Guide

UIFlow 1.0 Blockly

Event

Unit

UIFlow 1.0 Project

Finger

Example

Prints fingerprint ID, access level, and recognition status to the serial console.

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)

API

hat_Finger_0.addUser(1, 1)
  • Adds a fingerprint user ID and assigns an access level.
hat_Finger_0.readFingerCb(callback=hat_Finger_0_cb)
  • Retrieves the status of an unknown user.
access
  • Gets the access level information of the fingerprint user.
user_id
  • Retrieves the ID of the fingerprint user.
hat_Finger_0.state
  • Gets the status of the fingerprint recognition module.
hat_Finger_0.state
  • Reads information of a user with a specific ID and access level.
hat_Finger_0.removeAllUser()
  • Deletes all stored user data.
hat_Finger_0.removeUser(1)
  • Deletes the fingerprint data of a specified user ID.
On This Page