Global Positioning System ========================= .. figure:: /_static/products/ledong-module/static/images/gps_system.png :width: 65% :align: center Overview -------------------- Used for BeiDou and GPS positioning. Technical Specifications ------------------------ Operating voltage: VCC 3.3V -5V Module dimensions: 24*48mm Mounting: 2 plastic building block compatible through-holes Communication: Serial port, baud rate 9600 Output: Position information Positioning accuracy: 2.5 meters (CEP50, open sky) Time to first fix: 32 seconds (may take several minutes depending on specific environment) Low power consumption: Continuous operation <25mA Pin Definition ------------------- ===== =============== Pin Definition ===== =============== GND Ground VCC Power TX Serial transmit RX Serial receive ===== =============== Example Code ------------------- **Get satellite positioning information every 3 seconds and print** .. 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('No data') 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