Adding GPS tracking to your Raspberry Pi-based projects

Adding GPS tracking to your Raspberry Pi-based projects

Hi geeks some time it is hard to manage gps connection to Raspberry PI.

Adding GPS tracking to your Raspberry Pi-based projects 1

dont worry we need following item needs for connectivity

  1. Raspberry pi 3
  2. USB to TTL adapter (Prolific PL2303)
  3. Neo 6M-0-001 Ublox GPS Module

Step:1

Connect your GPS module to USB to TTL adapter(Tx and Rx cross connection Required dont get confused)

GPS ModuleUSB to TTL adapter
5v5v
VCC5v
RxTx
TxTx

Step:2

connect USB to TTL adaptor to raspberry pi and login to raspberry pi using putty or terminal.

Step:3

Now run following command to detect usb to ttl

ls /dev/ttyUSB*
sudo lsusb

I am assuming that USB to TTL connected on /dev/ttyUSB0. so run following command to get data from GPS.

sudo cat /dev/ttyUSB0

Adding GPS tracking to your Raspberry Pi-based projects 3

you will get data like above screenshot.Ctrl+C to stop output.

Optional Steps

Step 3

Installing a GPS Daemon (gpsd)
sudo apt-get install gpsd gpsd-clients python-gps

The next step is installing some software on your Raspberry Pi that understands the serial data that your GPS module is providing via /dev/ttyUSB0.

then run

//this command with tell actual gps data
gpsmon /dev/ttyUSB0

sudo gpsd /dev/ttyUSB0 -F /var/run/gpsd.sock

above will run gps data service in background

now see the data

cgps -s

 

article source 

 

Share this post

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.