Book Image

Arduino Development Cookbook

By : Cornel M Amariei
Book Image

Arduino Development Cookbook

By: Cornel M Amariei

Overview of this book

Table of Contents (16 chapters)
Arduino Development Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Localization – GPS


The Global Positioning System (GPS) uses an array of satellites orbiting around the Earth and sending time information. A GPS receiver picks up the signal transmitted from the satellites, calculates the time it took for the signal to arrive, and by identifying the position of the satellites, triangulates the position on the surface of the globe.

GPS is very useful in autonomous cars, RC planes or drones, and data logging applications. Here, we will learn how to read the data from a GPS, which is surprisingly easy. In this recipe, we will use the SoftwareSerial library that is better detailed in the Communication chapter.

Getting ready

Following are the ingredients needed for this recipe:

  • An Arduino board connected to a computer via USB

  • Jumper wires and a breadboard

  • A UART-compatible 5V GPS receiver such as the Copernicus

How to do it…

Hooking up a potentiometer is easy and here are the steps:

  1. Plug the GPS receiver into the breadboard.

  2. Connect the ground and power on the GPS to the...