Datasheet
And further below:
Should all be uncommented and look as above. This will configure the code to write GPS NMEA data to the /sd/gps.txt
file, appending new data to the end of the file.
Once the example is running as a main.py on your board open the serial REPL and you should see the raw NMEA
sentences printed out:
Check the gps.txt file (either under the root or /sd path depending on how you setup the example) in a text editor and
you'll see the same raw NMEA sentences:
# Path to the file to log GPS data. By default this will be appended to
# which means new lines are added at the end and all old data is kept.
# Change this path to point at internal storage (like '/gps.txt') or SD
# card mounted storage ('/sd/gps.txt') as desired.
#LOG_FILE = '/gps.txt' # Example for writing to internal path /gps.txt
LOG_FILE = '/sd/gps.txt' # Example for writing to SD card path /sd/gps.txt
# If writing to SD card customize and uncomment these lines to import the
# necessary library and initialize the SD card:
SD_CS_PIN = board.SD_CS # CS for SD card (SD_CS is for Feather Adalogger)
import adafruit_sdcard
spi = busio.SPI(board.SCK, MOSI=board.MOSI, MISO=board.MISO)
sd_cs = digitalio.DigitalInOut(SD_CS_PIN)
sdcard = adafruit_sdcard.SDCard(spi, sd_cs)
vfs = storage.VfsFat(sdcard)
storage.mount(vfs, '/sd') # Mount SD card under '/sd' path in filesystem.
© Adafruit Industries https://learn.adafruit.com/adafruit-ultimate-gps-featherwing Page 25 of 34










