User Tools

Site Tools


How To Use the Dexter GPS Sensor with the LEGO NXT

Author: Alvaro Pintado
Date: Last modified on 07/23/16
Keywords: dGPS, NXT, Potential Field

Tutorial Prequisite

  • Basic programming experience with NXC
  • Understanding of the GPS coordinate system


The Dexter Industries GPS is a GPS unit manufactured for use with the LEGO® MINDSTORMS® NXT. The sensor calculates positional and navigational data. It then delivers latitude, longitude, time, velocity, angle of travel, and navigational information such as distance and angle to a specified destination. The dGPS can be accurate up to 3 meters as most civilian GPS sensors are. Below is a diagram for the dGPS sensor and a table of percent difference calculations to a modern smartphone.

Installing the dGPS Sensor on Your LEGO NXT Robot

  1. Construct a way to mount the sensor so that an Ethernet cable can be routed to a sensor port on the NXT
  2. Connect an Ethernet cable from the dGPS sensor to a sensor port on the NXT

Here's an example of how to mount the dGPS sensor on the LEGO Tribot

Sample program with the dGPS API

  1. Download the dGPS NXC sample programs dgps-test1.7z
  2. Unzip and open up 'DGPS-test1.nxc'
  3. Compile and download to the NXT
  4. Run the program on your NXT

The dGPS sensor takes a couple minutes to find a satellite signal, even up to 10 minutes on it's first use.

Before a signal is acquired, the GPS will begin sending the default location and time (121000000 E, 24000000 W) until a valid signal is locked by the sensor.

After the dGPS sensor finds a satellite signal, the on-board LED will shine blue and you should have a screen on your NXT that look similar to this:

Final Words

This tutorial's objective was to instruct the reader on how to integrate the dGPS sensor with their LEGO NXT robot.

The sample program has all the sensor functions and how they should be implemented into a program. From there one can integrate them into their own program.

For questions, clarifications, etc, Email: [email protected]

nxt_gps.txt · Last modified: 2016/07/26 13:40 by alvaropintado