UIFlow Guide
from m5stack import *
from m5stack_ui import *
from uiflow import *
from comx.LoRaWAN import LoRaWAN_470
import time
screen = M5Screen()
screen.clean_screen()
screen.set_screen_bg_color(0xFFFFFF)
flag = None
lora470 = LoRaWAN_470(tx=17, rx=16)
lora470.set_join_mode(0)
lora470.config_OTAA('', '', '')
lora470.set_frequency_band_mask('0400')
lora470.set_rx_window_param(0, 0, 505300000)
lora470.set_class_mode(2)
lora470.set_uplink_downlink_mode(1)
lora470.join(1, 1, 8, 8)
flag = False
while True:
if not flag and lora470.check_join_status():
flag = True
print('Joined')
if flag:
lora470.send_data('M5STACK', 1, 5)
print(lora470.check_downlink_data())
wait(10)
wait_ms(2)
lora470.check_downlink_data()
lora470.check_join_status()
lora470.check_uplink_status()
lora470.set_frequency_band_mask('0001')
lora470.set_rx_window_param(0, 0, 505300000)
lora470.set_class_mode(0)
lora470.set_uplink_downlink_mode(1)
lora470.config_OTAA('', '', '')
lora470.get_ABP_config()
lora470.get_OTAA_config()
LoRaWAN_470(tx=0, rx=0)
lora470.join(1, 1, 8, 1)
lora470.join(0)
lora470.receive_data()
lora470.send_data('')
lora470.set_join_mode(0)
lora470.set_uplink_app_port(1)