-2

Hello, you may have heard this like thousand times. So i'm new to raspberry pi. And i just recently bought a raspberry pi 3 for my final year project. I bought this module also which is neo-6m GPS module because i my project relates to GPS. Apparently now, i'm clueless to how can i build an interface for my project. I know some programming language. If it is not such a burden, can anyone suggest me some tips and guide to how to build a simple interface for this project. Thank you :)

( i refered to these website for my project : https://www.instructables.com/id/Raspberry-Pi-the-Neo-6M-GPS/ https://pisavvy.com/neo-6m )

  • how to build a simple interface for this project interfacing what? Between Pi and GPS? Or a user interface? or ... – Dirk Dec 29 '18 at 16:47
  • yes i was thinking more like a user interface that i can use with the data i got from the gps. – Wero Dec 29 '18 at 18:45
  • Use the code on this repository, I have tested it. Works perfect github.com/wahajmurtaza/Python3-NEO-6M-GPS-Raspberry-Pi – Random Jul 27 at 13:29
1

GPSD

If you don't want to parse the NMEA sentences yourself, you can use GPSD, which does this work for you. Assuming you followed your linked tutorials you might have already installed gpsd via

sudo apt install gpsd

In order to check if it is running, check the status of the respective service by calling

systemctl status gpsd.service

GPSD-Clients

You did not really state, what kind of interface you are looking for. In case you simply want to see the currently available positioning information, you can use the clients provided for use with gpsd. You can install them with

sudo apt install gpsd-clients

Here you can use e.g. cgps for terminal based output and xgps for a nice GUI.

Programmatic access

If you want programmatic access to the data aquired from the GPS module, you need to install libgps-dev and/or python-gps

sudo apt install libgps-dev python-gps

Then have the necessary libraries and interfaces and a variety of programming languages. Specific examples for c, c++ and python can be found in this overview or more in detail in this SO question.

  • Yes i actually trying to find a way how i can use the data NMEA sentences for myself like putting it in a program or integrate with google maps maybe. – Wero Jan 19 at 8:31
1

The Instuctable you refer to has everything you need -- are you asking how to hook it up, or are you not wanting to use Python? I recently added an Adafruit GPS module to an existing RPi project that runs Node. However, you can follow the instructions in that instructable up to the point where he mentions testing it using 'off the shelf' software drivers. You do not need those because the GPS is now exposed as a Linux tty (teletype terminal) device. If your setup is correct, the following will spit out raw NEMA sentences from the device:

Note that I am not using the ttyAMA0 -- I have RPi3B+ -- I use ttyS0.

sudo cat /dev/ttyS0

Use Ctl-C to terminate output.

In my implementation, I use a Node module called 'raspi' to access the serial port and I parse the sentences myself -- they are not difficult to parse, but -- there are many already written, as well.

So, once you have made the wiring and modified your RPi by those instructions, you will want to investigate serial communications. I can help you with that, as they are not well understood now -- most people 'poll' them and that wastes your processor's time. My solution lets the data drive the collection and so -- it does not hang my processor like polling does. (Always let the data drive the application when possible.)

EDIT : My first draft of the tutorial is up now. It is rough, however -- you can email me with any further questions. I will add an address to it after posting this update. You should be able to get your device hooked up by using the first section of the tutorial.

http://stations.jinzai-studio.net/rpi3bgpstutorial.html

  • thank you so much haha no wonder i cant get it working. The python code they saying to give is still unavailable. Could you explain to me from the beginning on how should i setup my raspberry pi 3 to work it like in the Instructables , thank you. – Wero Dec 29 '18 at 18:49
  • Absolutely I just set mine up two days ago. What I will do is put up an HTML page on that same RPi3B+, which you can access right now at : stations.jinzai-studio.net/index.html – jinzai Dec 29 '18 at 23:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.