
UiFlow 使用教程
串口打印设备所在的经度和纬度
from m5stack import *
from m5ui import *
from uiflow import *
import module
screen = M5Screen()
screen.clean_screen()
screen.set_screen_bg_color(0xFFFFFF)
gps = module.get(module.GPS, (17, 16))
while True:
print((str('Latitude: ') + str((gps.latitude))))
print((str(' Longitude: ') + str((gps.longitude))))
wait_ms(2) gps.altitude gps.course gps.gps_date gps.latitude gps.latitude_decimal gps.longitude gps.longitude_decimal gps.pos_quality gps.satellite_num gps.speed_knot gps.gps_time module.get(module.GPS, (17, 16)) gps.set_time_zone(8) gps.uart_port_id(1)