Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 25 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,32 @@
# SFE_GPS_Tracker_Tutorial
SFE GPS Tracker Tutorial
========================================

GPS Tracker module tutorial project to help teach and improve beginners' GPS knowledge and capabilities.

<table class="table table-hover table-striped table-bordered">
<tr>
<td><a href="https://learn.sparkfun.com/tutorials/gps-geo-mapping-at-the-push-of-a-button"><div align="center"><img src="https://cdn.sparkfun.com/assets/learn_tutorials/9/0/4/Screen_Shot_2019-06-25_at_1.36.40_PM.png" title="Google Map with Logged Coordinates"></div></a></center></td>
<td><a href="https://learn.sparkfun.com/tutorials/gps-geo-mapping-at-the-push-of-a-button"><div align="center"><img src="https://cdn.sparkfun.com/assets/learn_tutorials/9/0/4/GPS_Tutorial-01.jpg" title="GPS Tracker in Enclosure"></div></a></td>
</tr>
</table>

To visit the full Sparkfun Tutorial go [here](https://learn.sparkfun.com/tutorials/gps-geo-mapping-at-the-push-of-a-button).

If you'd like to learn more about GPS, Sparkfun has a page dedicated to the learning and use of GPS: [Sparkfun GPS](https://www.sparkfun.com/gps)
If you'd like to learn more about GPS, Sparkfun has a page dedicated to the learning and use of GPS: [Sparkfun GPS](https://www.sparkfun.com/gps).


Repository Contents
-------------------

* **/Source** - Arduino example code

Documentation
--------------
* **Library** - Arduino libraries used
* **[Micro OLED](https://github.com/sparkfun/SparkFun_Micro_OLED_Arduino_Library)**
* **[u-blox GNSS](https://github.com/sparkfun/SparkFun_u-blox_GNSS_Arduino_Library)**
* **[Project Guide](https://learn.sparkfun.com/tutorials/gps-geo-mapping-at-the-push-of-a-button)**


## Community Improvements and Feedback

Expand Down
16 changes: 8 additions & 8 deletions Source/GPS_Mach2.ino → Source/GPS_Mach2/GPS_Mach2.ino
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/******************************************************************************
Google Earth KML GPS Position Logger v1.6
Google Earth KML GPS Position Logger v1.7
brandon.williams@sparkfun.com
May 6, 2019

Expand All @@ -13,7 +13,7 @@ card to retrive the file and open using Google Earth.

Resources:
SFE MicroOLED library: SFE_MicroOLED.h
SFE Ublox GPS library: http://librarymanager/All#SparkFun_Ublox_GPS
SFE u-blox GNSS library: //http://librarymanager/All#SparkFun_u-blox_GNSS
Arduino SD required libraries: SPI.h & SD.h

Download Google Earth: https://www.google.com/earth/versions/
Expand All @@ -30,13 +30,13 @@ Board Definition Packages:
//OLED and Ublox libraries
#include <Wire.h>
#include <SFE_MicroOLED.h>
#include "SparkFun_Ublox_Arduino_Library.h"
#include <SparkFun_u-blox_GNSS_Arduino_Library.h> //http://librarymanager/All#SparkFun_u-blox_GNSS

#define PIN_RESET 9 //OLED
#define DC_JUMPER 1 //OLED

//create objects
SFE_UBLOX_GPS myGPS;
SFE_UBLOX_GNSS myGNSS;
MicroOLED oled(PIN_RESET, DC_JUMPER);
File dataFile;

Expand Down Expand Up @@ -77,7 +77,7 @@ void setup() {
oled.print("Revving up the GPS unit, please wait");
oled.display();
delay(750);
while(myGPS.getLatitude() == 0){
while(myGNSS.getLatitude() == 0){
oled.clear(PAGE);
oled.setCursor(0,0);
oled.print("Looking for first fix, please wait");
Expand Down Expand Up @@ -108,7 +108,7 @@ void loop() {
dataFile.println("<kml xmlns=\"http://www.opengis.net/kml/2.2\">");
dataFile.println("<Document>");
int state = 0;
myGPS.begin();
myGNSS.begin();
/* "Continous" (not quite) loop will run until user performs kill action.
*
* 1. Button is pushed and released, then one coordinate point will add to the file
Expand Down Expand Up @@ -141,10 +141,10 @@ void loop() {
oled.clear(PAGE);
oled.display();

float latitude = myGPS.getLatitude();
float latitude = myGNSS.getLatitude();
latitude = latitude / 10000000;

float longitude = myGPS.getLongitude();
float longitude = myGNSS.getLongitude();
longitude = longitude / 10000000;


Expand Down