pdf-icon

UIFlow Guide

UIFlow 1.0 Blockly

Event

Unit

Atomic Base

UIFlow 1.0 Project

Unit CardKB

Example

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

setScreenColor(0x222222)
cardkb_0 = unit.get(unit.CARDKB, unit.PORTA)

while True:
  print(cardkb_0.keyData)
  print(cardkb_0.keyString)
  wait(0.1)
  wait_ms(2)

API

print(cardkb_0.keyData)
  • Return the ASIIC value
print(cardkb_0.isNewKeyPress())
  • Return character
print(cardkb_0.keyString)
  • Detect the key, press it to return to true
On This Page