Page 1 of 1

Raspberry Pi - Data logging

Posted: Thu Apr 21, 2016 4:48 pm
by wmkhizer
Hi there, im kinda new to raspberry pi.
Can someone share some tips & advice on how to make a data logging.
I'm using Raspberry pi 2 model B, Jessie.
Hope all the experts out there can help the newbies here :)

Re: Raspberry Pi - Data logging

Posted: Fri Apr 22, 2016 12:47 am
by experix
"data logging" is a huge category. Nobody can tell you how to do "data logging". Start with a defined problem, and you can get lots of hints about what to use and how to use it.

Re: Raspberry Pi - Data logging

Posted: Fri Apr 22, 2016 7:47 am
by wmkhizer
oh sorry for that..
im currently working on a project using a GPS (ublox neo 6m).
I've connected the GPS to GPIO ports and it work okay. i wanted to collect & save all the data that it receives.
so i was just wondering how to do that..

Re: Raspberry Pi - Data logging

Posted: Fri Apr 22, 2016 8:49 am
by davidcoton
wmkhizer wrote:oh sorry for that..
im currently working on a project using a GPS (ublox neo 6m).
I've connected the GPS to GPIO ports and it work okay. i wanted to collect & save all the data that it receives.
so i was just wondering how to do that..
How much data each time, and how often?

Re: Raspberry Pi - Data logging

Posted: Sat Apr 23, 2016 10:40 pm
by DougieLawson
Are you going to decode the NMEA sentences or simply store those for later processing?

Do you want to use a flat file, a comma separated variables file (which you can load in LibreOffice Calc or Excel), or a database of some description?

Re: Raspberry Pi - Data logging

Posted: Tue Apr 26, 2016 5:08 pm
by wmkhizer
DougieLawson wrote:Are you going to decode the NMEA sentences or simply store those for later processing?

Do you want to use a flat file, a comma separated variables file (which you can load in LibreOffice Calc or Excel), or a database of some description?
Sorry for the late reply, i just want to simply store it for later processing.
A comma separated variables would be nice. easily to put in excel n etc..

How much data each time, and how often?
i'm not quite sure. Every few seconds? How would you recommend?

Re: Raspberry Pi - Data logging

Posted: Tue Apr 26, 2016 5:13 pm
by davidcoton
wmkhizer wrote:How much data each time, and how often?
i'm not quite sure. Every few seconds? How would you recommend?
Are you tracking a walker or a rocket? What precision do you need (that is, what distance error can you tolerate before updating)?

You need to think through these basics (and probably several more) to define your requirements before trying to specify a solution.

Re: Raspberry Pi - Data logging

Posted: Tue Apr 26, 2016 6:38 pm
by liudr
I recommend Python as the programming language. You need to install pyserial library though. You can open serial port and just dump whatever you read to a file, flush the file periodically to prevent loss.
Install the library:

Code: Select all

sudo pip3 install pyserial
Then find some sample code of serial port communication. I assume you have your GPS hooked up to the AMA0 serial port on GPIO pins, correct?