English
English
简体中文
日本語

UiFlow Tutorial

UiFlow1 Development Guide

Project Management

Use LTE network

UiFlow1 Blockly

Event

Unit

Unit Laser RX

Example

Obtain the laser data received by the device

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

setScreenColor(0x222222)
laser_rx_0 = unit.get(unit.LASERRX, unit.PORTB)
laser_tx_0 = unit.get(unit.LASERTX, unit.PORTB)

while True:
  print(laser_rx_0.value())
  wait_ms(2)

API

print((str('value:') + str((laser_rx_0.value()))))
  • Gets the data received by Unit Laser RX
Page Tools
PDF
On This Page