UIFlow Guide
以下案例演示由Coordinator和End device组成网络实现数据发送和接收。
from m5stack import *
from m5ui import *
from uiflow import *
from comx.zigbee import Zigbee
import time
setScreenColor(0x222222)
zigbee = Zigbee(17, 16)
zigbee.set_param_module(1, 0x1617, 20, 1, 0x2345, 6, 1, '')
while True:
zigbee.send_payload('Hello!')
print((str('Send:') + str('Hello!')))
wait(1)
wait_ms(2)
from m5stack import *
from m5ui import *
from uiflow import *
from comx.zigbee import Zigbee
setScreenColor(0x222222)
zigbee = Zigbee(17, 16)
zigbee.set_param_module(3, 0x1617, 20, 1, 0x2345, 6, 1, '')
while True:
if zigbee.check_payload():
print((str('Received:') + str((zigbee.recv_payload()))))
wait_ms(2)
from comx.zigbee import Zigbee
zigbee = Zigbee(17, 16)
zigbee.set_param_module(3, 0x1617, 20, 1, 0x2345, 6, 1, '')
zigbee.reboot_module()
zigbee.check_payload()
zigbee.recv_payload()
zigbee.send_payload('Hello!')
zigbee.core_baudrate(38400)
zigbee.get_param_module(index)
zigbee.version_module()