全球定位系统 =================== .. figure:: /_static/products/ledong-module/static/图片/全球定位系统.png :width: 65% :align: center 概述 -------------------- 用于进行北斗、GPS定位。 技术参数 ------------------- 工作电压: VCC 3.3V -5V 模块尺寸:24*48mm 固定安装:2个兼容塑料积木通孔 通讯方式:串口,波特率9600 输出:位置信息 定位精度:2.5 米(CEP50,开阔地) 首次定位时间:32 秒(也有可能是几分钟,要看具体环境而定) 低功耗:连续运行<25mA 引脚定义 ------------------- ===== ======== 引脚 定义 ===== ======== GND 地 VCC 电源 TX 串口发送 RX 串口接收 ===== ======== 示例程序 ------------------- **每个3秒获取卫星定位信息并打印** .. code-block:: python from mpython import * from bluebit import GPS GNSS = GPS(uart_num=1,pin_tx=Pin.P16,pin_rx=Pin.P15) import time while True: GNSS.GNSS_Read() GNSS.GNSS_Parese() if GNSS.DataIsUseful: print(GNSS.latitude+GNSS.N_S) print(GNSS.longitude+GNSS.E_W) elif not GNSS.DataIsUseful: print('没有数据') rgb.fill((int(153), int(0), int(0))) rgb.write() time.sleep_ms(1) time.sleep(1) rgb.fill(( 0, 0, 0) ) rgb.write() time.sleep_ms(1) time.sleep(3) .. figure:: /_static/products/ledong-module/static/examples/gps.png :width: 100% :align: center