Getting GPS to log to SD card

Hello, I'm having a bit of trouble finding a way to get this Adafruit GPS to log data onto the sd card on the adafruit datalogging shield.

I need to get Data from the RTC and GPS to be on the same line and I need to be able to add a temp sensor in the future.

I have no Idea on how to get this to work.

Thank you

nikhil2182:
I need to get Data from the RTC and GPS to be on the same line

Assuming that is really what your problem is, it is simply a matter of keeping on adding data, myFile.print(dadedah); with comma separations, until you get to the last one on the line, which has
myFile.println instead, thereby starting a new line.

void WriteSD()
{  
           myFile = SD.open(filename, FILE_WRITE);//<<< OPEN
  myFile.print(hour);
  myFile.print(":");
  myFile.print(minute);
  myFile.print(":");
  myFile.print(second);
  myFile.print(",");            //time

  myFile.print(DrainTemp);
  myFile.print(",");
  myFile.println(ShrTemp);
       myFile.close();//>>>>>>>>>>>>>>>CLOSE     
}

There is a datalogging example included in the IDE.

Oh that seems simple. Thank you!

But what about getting data from the GPS onto the SD card? I'm dumbstruck.

But what about getting data from the GPS onto the SD card? I'm dumbstruck.

You got some answers in your previous question. For example, "The NeoGPS library has an example for logging to the SD card. See NMEASDlog.ino."

Did you try something?

Yep, I’ve been trying but I’ve been getting this error message:

Arduino: 1.8.3 (Windows 10), Board: “Arduino/Genuino Uno”

In file included from C:\Users\nikhil\Documents\Arduino\libraries\NeoGPS\examples\NMEASDlog\NMEASDlog.ino:40:0:

C:\Users\nikhil\Documents\Arduino\libraries\NeoGPS\src/GPSport.h:152:76: fatal error: NeoSWSerial.h: No such file or directory

#include <NeoSWSerial.h> // Any pins, only @ 9600, 19200 or 38400 baud

^

compilation terminated.

exit status 1
Error compiling for board Arduino/Genuino Uno.

any ideas?

Did you download NeoSWSerial with the Library Manager?

Okay, adding that library and a few others made a big difference.
However, I still get this error

#error You must define NMEAGPS_INTERRUPT_PROCESSING in NMEAGPS_cfg.h!

Deleting this line and its corresponding lines does allow the code to compile and upload.
I'm not really sure how much I lose out on by deleting the line.

Nevertheless, I don't know if I can get the data to log. I can't really check how well it's working right now since my GPS can't seem to get a fix on satellites. I will give you an update as soon as I get something working.

However, I still get this error

#error You must define NMEAGPS_INTERRUPT_PROCESSING in NMEAGPS_cfg.h!

Deleting this line and its corresponding lines does allow the code to compile and upload.
I'm not really sure how much I lose out on by deleting the line.

Why would you delete that line? Just do what it said to do, and the error will go away.

Edit the NMEAGPS_cfg.h file in your Arduino/Libraries/NeoGPS/src subdirectory and uncomment line 144.

sorry about that, I’m really new to this stuff and am still trying to understand how this all works.
I did what you asked me to do but now I am presented by this and I don’t really understand what it means.

In file included from C:\Users\nikhil\AppData\Local\Temp\arduino_modified_sketch_679208\NMEASDlog.ino:41:0:

C:\Users\nikhil\Documents\Arduino\libraries\NeoGPS\src/GPSport.h:93:38: fatal error: NeoICSerial.h: No such file or directory

              #include <NeoICSerial.h>

                                      ^

compilation terminated.

exit status 1
Error compiling for board Arduino/Genuino Uno.

If you did not modify GPSport.h, it assumes you have connected the GPS device to the pins required by AltSoftSerial (8 & 9 on an UNO). When INTERRUPT_PROCESSING is enabled, this requires the NeoICSerial instead.

Read through the Installation instructions again. You seem to have skipped step 2, Choosing A Serial Port.

Please stop cross-posting.
Thread locked.