O'Reilly logo

Wearable-Tech Projects with the Raspberry Pi Zero by Jon Witts

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Reading our GPS data

We need our GPS sensor to get a fix on the GPS satellites before we can read anything useful from it. You will know if this has happened as the small red FIX LED will start to flash once every 15 seconds instead of once every second. If you are running this indoors or are having difficulty getting a satellite lock, you can use the Adfruit SMA to μFL adaptor cable and Adafruit GPS Antenna, and put the antenna near or outside a window to get a satellite lock.

Now that we have a GPS satellite lock we can, at this point, just read the data coming from our GPS sensor by running this:

sudo cat /dev/ttyS0

If you all is well, you should something like this scrolling up your SSH terminal window:

Press Ctrl + C to exit the stream ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required