TOP Contributors

  1. MIKROE (2782 codes)
  2. Alcides Ramos (378 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (97 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (139610 times)
  2. FAT32 Library (72049 times)
  3. Network Ethernet Library (57275 times)
  4. USB Device Library (47639 times)
  5. Network WiFi Library (43233 times)
  6. FT800 Library (42571 times)
  7. GSM click (29934 times)
  8. mikroSDK (28321 times)
  9. PID Library (26945 times)
  10. microSD click (26312 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
Project

Using a GPS Click on a Raspberry Pi

Rating:

5

Author: Andrew Hazelden

Last Updated: 2016-02-17

Package Version: 1.0.0.0

Category: GPS

Downloaded: 946 times

Followed by: 3 users

License: MIT license  

gps2udp is a script that connects a MikroElektronika GPS click board via USB to a Raspberry PI. The serial GPS data is pushed out through a UDP socket onto the network interface. The GPS is set to run at 115200 baud using the stty command.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Using a GPS Click on a Raspberry Pi" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Using a GPS Click on a Raspberry Pi" changes.

Do you want to report abuse regarding "Using a GPS Click on a Raspberry Pi".

  • Information
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
Other ARM Compilers
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

Project Blog

The Raspberry Pi and the GPS Click

The Raspberry Pi and the GPS Click

This is a screenshot showing a USB serial connection from a GPS Click board to a Raspberry Pi.

View full image

Installation

Step 1. Install the supporting serial libraries on the Raspberry Pi:

       sudo apt-get install setserial netcat screen

Step 2. Copy the script gps2udp.sh to your raspberry pi.

Step 3. Change the permissions on the gps2udp.sh script so it will run:

     chmod 777 gps2udp.sh

Step 4. Start the script from the command prompt:

     ./gps2udp.sh

Running gps2udp

Running gps2udp

The gps2udp.sh script makes it simple to connect to the GPS Click board on Raspbian Linux.

View full image

Connecting to the UDP socket

Once you have started the gps2dps.sh script on the Raspberry Pi you can connect to the gps datastream using a UDP socket from any computer on your network.

Viewing UDP data in mikroC

The easiest way to view a UDP datastream is to use the mikroC UDP terminal program. It is found in the Tools > UDP Terminal menu.

Open the UDP Terminal

Open the UDP Terminal

Open the mikroC Tools Menu and start the UDP terminal.

View full image

Start by typing in the ip address for the raspberry pi. In my case this is 192.168.1.137

Enter the port 36700 for the UDP connection.

To start the connection you need to send a bit of data over the UDP socket. Type "1" in the send text field and click the "send" button. GPS data should start flowing into the receive window.

Connect to the Raspberry Pi.

Connect to the Raspberry Pi.

You can connect to the Raspberry Pi using the UDP terminal.

View full image

Linux/Mac/Cygwin Command Line You can also connect to the Raspberry PI hosted GPS click from your desktop system with a tool called netcat. Tip: You need to have the full-featured version of nc / netcat installed that supports UDP connections.

Viewing UDP Data

Viewing UDP Data

The Linux terminal window can be used to viewing the live UDP data too.

View full image

My Raspberry Pi has an ip address of 192.168.1.137 and the UDP port is 36700.

To start the desktop connection to the Raspberry Pi hosted GPS click open the terminal and type in:

     netcat -u 192.168.1.137 36700

or

     nc -u 192.168.1.137 36700

Once the connection has been made you need to press the enter key once to start the UDP data flowing. When you are done you can close the network connection on the desktop by pressing Control-C.

ALSO FROM THIS AUTHOR

ACH Thumbstick Click RPi Demo

4

The python based thumbstick.py demo allows you to read a MikroElektronika Thumbstick Click board on a Raspberry PI using the GPIO and SPI inputs via a Pi Click Shield. The Thumbstick Click board uses an SPI based MCP3204 module for reading the joystick axes and the joystick "center click" button is read using the GPIO input 17 on the Raspberry Pi.

[Learn More]

Snowburst Game

0

Tap to the screen to melt the falling snowflakes before you get snowed in. If you miss a snow flake the snowbank gets higher. Every 500 points the snowbank starts to melt a bit. You can play with two fingers but be sure to tap only one snowflake at a time. If you tap the status bar at the bottom of the screen you can mute the background music.

[Learn More]

Mission Control for Raspberry Pi

5

Mission Control is a ground station program that allows you to plot the GPS based latitude, longitude, and altitude of your Raspberry Pi using a MikroElektronika GPS Click Board. The program has a graphical dashboard, and supports sharing the GPS position data via the internet using a Google Earth KMZ file.

[Learn More]