Project showcase
Marco Polo || Mega Route Logger

Marco Polo || Mega Route Logger © GPL3+

Track and save your foot path.

  • 738 views
  • 0 comments
  • 3 respects

Components and supplies

Apps and online services

About this project

Marcopolo is a route history saver by Arduino Mega saved to MicroSD Card and directed by GPS.

Gathering Date Time Latitude and Longitude

Draw my route on google map

In the first video I got the travel time, latitude, Longitude and velocity from GPS Module.

Code

CodeC/C++
/*
  SD card datalogger using Mega2560 - Boaz & Priyatharshini
 ** MOSI - pin 51
 ** MISO - pin 50
 ** CLK - pin 52
 ** CS - pin 53
*/
#include <SoftwareSerial.h>
#include <TinyGPS.h>
#include <SPI.h>
#include <SD.h>

SoftwareSerial mySerial(10, 11);
TinyGPS Bz_gps;

long lat, lon;
unsigned long time, date, speed, course;
unsigned long chars;
unsigned short sentences, failed_checksum;

int year;
int fkmph;
byte month, day, hour, minute, second, hundredths;
unsigned long fix_age;

String dataString = "";
const int chipSelect = 53;

void setup()
{
  mySerial.begin(9600);
  Serial.begin(9600);
  pinMode(53, OUTPUT);
  if (!SD.begin(chipSelect))
  {
    Serial.println("Card failed, Check MOSI & MISO pin Connection");
    return;
  }
  Serial.println("card initialized.");
}
void loop()
{
  if (mySerial.available())
  {
    char c = mySerial.read();
    //Serial.write( c );
    if (Bz_gps.encode( c ))
    {
      Bz_gps.get_position(&lat, &lon, &fix_age);
      Bz_gps.get_datetime(&date, &time, &fix_age);
      speed = Bz_gps.speed();
      course = Bz_gps.course();
      Bz_gps.crack_datetime(&year, &month, &day, &hour, &minute, &second, &hundredths, &fix_age);
      int fkmph = Bz_gps.f_speed_kmph();
      dataString = String(day) + "," + String(month) + "," + String(year) + "," + String(hour) + "," + String(minute) + "," + String(second) + "," + String(lat) + "," + String(lon) + "," + String(fkmph);
      Serial.println(dataString);
      File dataFile = SD.open("datalog.txt", FILE_WRITE);
      if (dataFile)
      {
        dataFile.println(dataString);
        dataFile.close();
      }
      else
      {
        Serial.println("error opening datalog.txt");
      }
    }
  }
}

Schematics

Circuit Diagram
I Used SKG13BL GPS Module
Circuit%20diagram bb

Comments

Similar projects you might like

Bike Route Data Gatherer

Project tutorial by Paul Trebilcox-Ruiz

  • 9,200 views
  • 0 comments
  • 36 respects

SCADA Control of a Water Pumping Station

Project showcase by Muntadhar Jafar

  • 5,345 views
  • 1 comment
  • 14 respects

Arduino-based Obstacle Monitoring System

Project showcase by Boaz Lawnce

  • 2,237 views
  • 0 comments
  • 4 respects

Energy Data Logger

Project in progress by Javi D'Ambra

  • 3,688 views
  • 5 comments
  • 9 respects

Mega Bread - Atari Joystick Linking for Robotics Control

Project in progress by Pigeon-Kicker

  • 1,439 views
  • 3 comments
  • 10 respects

MKR Zero Weather Data Logger

Project tutorial by Arduino_Genuino

  • 24,367 views
  • 18 comments
  • 48 respects
Add projectSign up / Login