Datasheet
CircuitPython Library
You can easily use a GPS module like the ultimate GPS FeatherWing with CircuitPython code. Python code is well
suited for parsing and processing the text output from GPS modules and this Adafruit CircuitPython
GPS (https://adafru.it/BuR) module handles most of the work for you!
First make sure your Feather is running CircuitPython firmware, and the GPS FeatherWing is assembled and
connected to the Feather board. By default the FeatherWing will automatically use the Feather's RX and TX pins for a
hardware serial connection.
Note: Just like with Arduino the ESP8266 and nRF52832 Feather shares its serial RX and TX pins with the USB serial
connection and can be difficult to use with GPS modules. In particular you won't be able to use the REPL and other
core tools like ampy to copy files if a GPS FeatherWing is connected. It's recommended not to use the ESP8266 or
nRF52832 with the GPS FeatherWing.
Next you'll need to install the Adafruit CircuitPython GPS (https://adafru.it/BuR) library on your CircuitPython board
First make sure you are running the latest version of Adafruit CircuitPython (https://adafru.it/tBa) for your board.
Next you'll need to install the necessary libraries to use the hardware--carefully follow the steps to find and install these
libraries from Adafruit's CircuitPython library bundle (https://adafru.it/zdx). For example the Circuit Playground Express
guide has a great page on how to install the library bundle (https://adafru.it/Bf2) for both express and non-express
boards.
Remember for non-express boards like the Trinket M0, Gemma M0, and Feather/Metro M0 basic you'll need to
manually install the necessary libraries from the bundle:
adafruit_gps.mpy
You can also download the adafruit_gps.mpy file from the Adafruit CircuitPython GPS releases
page (https://adafru.it/BuS).
Before continuing make sure your board's lib folder or root filesystem has the adafruit_gps.mpy, files and
folders copied over.
Usage
To demonstrate the usage of the GPS module in CircuitPython let's look at a complete program example. the
simple.py file from the module's examples. Save this file as main.py on your board, then open the REPL connection to
the board to see its output:
# Simple GPS module demonstration.
# Will wait for a fix and print a message every second with the current location
# and other details.
import time
import board
import busio
import adafruit_gps
# Define RX and TX pins for the board's serial port connected to the GPS.
# These are the defaults you should use for the GPS FeatherWing.
# For other boards set RX = GPS module TX, and TX = GPS module RX pins.
© Adafruit Industries https://learn.adafruit.com/adafruit-ultimate-gps-featherwing Page 17 of 34










