Tracking code to Google sheets for lat & long


So i got my cleaned and working, it took me time to understand the logic to be able to edit it. I am currently using IFTTT to get my lat and long on a google sheets document. My goal is: i am trying to map the tracking device i have which is built up like this ‘’ without the oled screen, to map my current location on google maps.

Here is my edited and cleaned code (note: i kept some display because it was causing errors, if someone can spot anything that can remove them without affecting the lat and long please let me know.

// dependencies.AssetTrackerRK=0.1.7
// dependencies.oled-wing-adafruit=0.0.5

// Port of TinyGPS for the Particle AssetTracker
#include "TinyGPS++.h"

#include "oled-wing-adafruit.h"


   This sample sketch demonstrates the normal use of a TinyGPS++ (TinyGPSPlus) object directly.

void displayInfo(); // forward declaration

const unsigned long PUBLISH_PERIOD = 15000;
const unsigned long SERIAL_PERIOD = 5000;
const unsigned long MAX_GPS_AGE_MS = 10000; // GPS location must be newer than this to be considered valid

// The TinyGPS++ object
TinyGPSPlus gps;
unsigned long lastSerial = 0;
unsigned long lastPublish = 0;
unsigned long startFix = 0;
bool gettingFix = false;

OledWingAdafruit display;

void setup()
    // The GPS module on the AssetTracker is connected to Serial1 and D6

    // Settings D6 LOW powers up the GPS module
    pinMode(D6, OUTPUT);
    digitalWrite(D6, LOW);
    startFix = millis();
    gettingFix = true;


void loop()

    while (Serial1.available() > 0) {
        if (gps.encode( {

void displayInfo()
    if (millis() - lastSerial >= SERIAL_PERIOD) {
        lastSerial = millis();

        char buf[128];
        char pubbuf[120];
        if (gps.location.isValid() && gps.location.age() < MAX_GPS_AGE_MS) {

            snprintf(buf, sizeof(buf), "%f,%f",, gps.location.lng());
            snprintf(pubbuf, sizeof(pubbuf),  "%f,%f",, gps.location.lng());
            if (gettingFix) {
                gettingFix = false;
                unsigned long elapsed = millis() - startFix;
                Serial.printlnf("%lu milliseconds to get GPS fix", elapsed);
        else {
            strcpy(buf, "no location");
            if (!gettingFix) {
                gettingFix = true;
                startFix = millis();

        if (Particle.connected()) {
            if (millis() - lastPublish >= PUBLISH_PERIOD) {
                lastPublish = millis();
                Particle.publish("gps", buf, PRIVATE);


Gps wing helpppp!

Which errors?


so when i delete the remaining display it gives me weird symbols in the events console


Weird symbols in a string typically suggest that a string is either not properly filled or not terminated.
How does one such corrupted string look?
Do you see these weird symbols in the serial monitor too?


Im not really sure, when i type in my comand the serial monitor -follow it just keeps on running and nothing ever happens (what’s weird is i see on the top of my command window gash, git, python alternating every second)