===== 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 ==== dGPS for LEGO NXT ==== 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. {{:alvarop:dgps.png?750|}} {{:alvarop:gps_percent_difference.png?1000|}} ==== Installing the dGPS Sensor on Your LEGO NXT Robot ==== - Construct a way to mount the sensor so that an Ethernet cable can be routed to a sensor port on the NXT - 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 {{:alvarop:img_20160725_182712824.jpg?200|}} ==== Sample program with the dGPS API ==== - Download the dGPS NXC sample programs {{:alvarop:dgps-test1.7z|}} - Unzip and open up 'DGPS-test1.nxc' - Compile and download to the NXT - 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: {{:alvarop:img_20160725_200142.jpg?500|}} 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: pintado@unlv.nevada.edu