Table of Contents

How to Monitor GPS Speed Using NEO-6M GPS Sensor and Quarky

Example Description
Explore how GPS technology works by creating a Quarky GPS Speed Monitor using PictoBlox Block Coding. In this project, students will learn how to use GPS data to detect the current speed and display real-time speed information on the screen. By combining Quarky with PictoBlox, they will understand how GPS sensors help track movement and speed. This hands-on project introduces students to GPS-based applications, block-based programming, and real-world technology in an interactive and fun way.

Introduction

GPS (Global Positioning System) is widely used in navigation, vehicle tracking, location monitoring, and transportation applications. A GPS module can provide information such as latitude, longitude, altitude, speed, number of satellites, and direction.

In this project, we will use the NEO-6M GPS sensor with Quarky to monitor the current speed of the device. The NEO-6M communicates with Quarky through UART serial communication, while PictoBlox is used to program Quarky using blocks.

The project continuously checks the GPS speed and compares it with a predefined threshold of 5 km/h.

The system works in two conditions:

  • Speed > 5 km/h: Displays a warning pattern and shows “TOO FAST!”
  • Speed ≤ 5 km/h: Displays a normal-status pattern and shows the current speed.

This provides a simple introduction to GPS sensing, external sensor interfacing, threshold-based decision making, and real-time feedback.

Prerequisites / Setting Up the Stage / Setting Up the Hardware

Hardware Required

  • Quarky
  • NEO-6M GPS Sensor/Module
  • Jumper wires
  • USB cable
  • Computer/Laptop

Software Required

  • PictoBlox
  • Quarky Advance Sensors Extension
  • Block Coding

Connecting Quarky to PictoBlox

Step 1: Select Quarky

  1. Open PictoBlox on your computer.
  2. Select Block Coding.
  3. Click on Board from the top toolbar.
  4. Select Quarky.
  5. Connect Quarky to the computer using a USB cable.
  6. Select the appropriate serial port and connect Quarky.

Quarky can be connected to PictoBlox through USB serial communication.

Connecting the NEO-6M GPS Sensor to Quarky

The NEO-6M GPS module communicates with Quarky using UART serial communication.

Connect the communication pins as follows:

Quarky NEO-6M GPS
Tx Rx
Rx Tx
GND GND
Power Appropriate power supply

 

Getting a GPS Fix

After the NEO-6M GPS module is initialized, it starts searching for satellites.

GPS performance depends on the surrounding environment. For the first fix, place the GPS module in an open area with a clear view of the sky.

A cold start can take approximately 30 seconds to several minutes to obtain a satellite fix.

Therefore, the message:

“Waiting for GPS fix…”

is displayed before the speed-monitoring process begins.

Step-by-Step Block Coding Guide

Step 2: Add the Extension

  1. Open the Extensions section in PictoBlox.
  2. Click Add Extension.
  3. Search for Quarky Advance Sensors.
  4. Select the extension.
  5. The Quarky Advance Sensors blocks will appear in the Blocks Palette.

Step 4: Initialize the NEO-6M GPS Sensor

From the Quarky Advance Sensors extension, add:

initialize NEO-6M sensor

Place it below the when green flag clicked block.
Block Image_Green Flag

This initializes communication between Quarky and the NEO-6M GPS module through UART. After initialization, the GPS module starts searching for satellites.

The beginning of the program becomes:

when green flag clicked
↓
initialize NEO-6M sensor

Step 5: Display GPS Fix Status

From the Looks palette, add a say block.

Enter: Waiting for GPS fix… then add: wait 2 seconds

Step 6: Create a Continuous Monitoring Loop

From the Control palette, add: forever

Place the block after the wait 2 seconds block.

Step 7: Read the GPS Speed

Inside the forever loop, add an if-else block.

From the Quarky Advance Sensors extension, use: get NEO-6M [Speed]

Step 8: Set the Speed Threshold

Set the condition of the if-else block to: get NEO-6M [Speed] > 5

Here, 5 km/h is the predefined speed threshold.

The logic is:

GPS Speed > 5 km/h → Warning

GPS Speed ≤ 5 km/h → Normal

Step 9: Display the Warning Message

Inside the if section, add the display matrix as block.

Select the red warning pattern shown in the program.

This provides a visual warning when the GPS speed exceeds the predefined limit.

Next, add a say block and Enter: TOO FAST!

Step 10: Display Normal Speed Status

Inside the else section, add another: display matrix as block.

Select the green/normal-status pattern shown in the program.

This indicates that the current speed is within the predefined limit.

Step 11: Display the Current Speed

Below the normal-status LED matrix block, add a say block.

Use the join block from the Operators palette.

Create the following message: Speed: [get NEO-6M Speed]

Step 12: Add a Delay

At the bottom of the forever loop, add: wait 1 seconds

Complete Code

Output

Conclusion

In this project, we interfaced a NEO-6M GPS sensor with Quarky and used PictoBlox to create a real-time GPS speed monitoring system. The program continuously reads the GPS speed and compares it with a predefined 5 km/h threshold.

When the speed exceeds the threshold, Quarky provides a warning through its LED matrix and displays “TOO FAST!”. Otherwise, it displays the current speed along with a normal-status pattern.

The project demonstrates how GPS data, external sensor interfacing, UART communication, conditional logic, and real-time feedback can be combined to create practical monitoring and safety applications.