Rapsberry Pi: set up GPS - how it works
The Raspberry Pi is a versatile single-board computer with countless possible uses. This practical tip shows you how to set up with this GPS.
Setting up GPS with Raspberry Pi: the hardware
To use GPS with your Raspberry Pi, you need a GPS module:
- For example, as a simple and reliable GPS module, you can buy the Ublox Neo 6M GPS module.
- Then you need to connect it to your Raspberry Pi. To do this, wire the following connections from the GPS module to those of the Raspberry Pi:
- VCC with 3.3V (Pin 1) | RX with TXD / GPIO 14 (Pin 8) | TX with RXD / GPIO 15 (Pin 10) | GND with ground (pin 6)
- You can find a PIN assignment on the official website of the Raspberry Pi.
Set up GPS with Raspberry Pi: Install software
Then you have to install the corresponding software for the GPS module and release the serial interface. To do this, proceed as follows:
- To enable the serial interface, open the config file with "sudo nano / etc / inittab".
- Delete the following line there: "T0: 23: respawn: / sbin / getty -L ttyAMA0 115200 vt100" and then save the file.
- Then edit an additional configuration file with "sudo nano /boot/cmdline.txt".
- In this file you have to remove the entries "console = ttyAMA0, 115200 kgdboc = ttyAMA0, 115200".
- Then update the installed packages on your Raspberry Pi.
- You then have to install additional software for the GPS module. To do this, type "sudo apt-get install minicom gpsd gpsd-clients" in the console.
- After the installation you should restart your Raspberry with "sudo reboot now".
- Enter "stty -F / dev / ttyAMA0 9600" in the console to inform the module of the appropriate transmission speed.
- In order for your position data to be displayed, you must first configure the software with "sudo gpsd / dev / ttyAMA0 -F /var/run/gpsd.sock -n".
- You can then start the program. To do this, enter "cgps -s".
Raspberry Pi: the most bizarre projects
We will show you how to set up remote access to the desktop of your Raspberry Pi in our next article.