pdf-icon

UIFlow Guide

UiFlow1 Blockly

Event

Unit

UiFlow1 Project

Unit OP 90 180

Example

Get the current status of the photoelectric limit switch

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

setScreenColor(0x222222)
OP90_0 = unit.get(unit.OP, unit.PORTA)

while True:
  print((str('Status:') + str((OP90_0.value()))))
  wait_ms(2)

API

print(OP90_0.value())
  • Obtain the device detection status
On This Page