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
- Open PictoBlox on your computer.
- Select Block Coding.
- Click on Board from the top toolbar.
- Select Quarky.
- Connect Quarky to the computer using a USB cable.
- 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
- Open the Extensions section in PictoBlox.
- Click Add Extension.
- Search for Quarky Advance Sensors.
- Select the extension.
- 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.

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.


