-
Notifications
You must be signed in to change notification settings - Fork 3
The ublox neo 6m GPS receiver
Uli Raich edited this page Aug 28, 2020
·
16 revisions
Most GPS receivers use a UART to communicate with their hosts and the Neo 6M is no exception. The ESP32 has 3 hardware UARTs with the following default connections:
UART number | default Rx, Tx, GPIO pins |
---|---|
0 | 3,1 |
:-- | :--: |
1 | 9,10 |
:-- | :--: |
2 | 16,17 |
On our system UART 0 is reserved for REPL, GPIO 9 and 10 are not pulled out to the connector and GPIO 16,17 are used by PSRAM. Fortunately the ESP32 allows to re-map UARTs to just about any GPIO pin using the GPIO matrix and the MicroPython driver supports the re-mapping. We can define a UART as follows: | |
uart2=machine.UART(2, baudrate=9600, rx=21, tx=22, timeout=10000) | |
For more information about the ESP32 UART driver in MicroPython see | |
https://docs.micropython.org/en/latest/library/machine.UART.html#machine-uart | |
The card on which the Neo 6M GPS receiver is mounted has 4 connection pins (starting from the left): |
Course on the Internet of Things at the University of Cape Coast, Ghana