wmkhizer
Posts: 5
Joined: Thu Apr 21, 2016 4:40 pm

Raspberry Pi - Data logging

Thu Apr 21, 2016 4:48 pm

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 :)

User avatar
experix
Posts: 204
Joined: Mon Nov 10, 2014 7:39 pm
Location: Coquille OR
Contact: Website

Re: Raspberry Pi - Data logging

Fri Apr 22, 2016 12:47 am

"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.

wmkhizer
Posts: 5
Joined: Thu Apr 21, 2016 4:40 pm

Re: Raspberry Pi - Data logging

Fri Apr 22, 2016 7:47 am

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..

User avatar
davidcoton
Posts: 4141
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: Raspberry Pi - Data logging

Fri Apr 22, 2016 8:49 am

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?
Signature retired

User avatar
DougieLawson
Posts: 36123
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Raspberry Pi - Data logging

Sat Apr 23, 2016 10:40 pm

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?
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

wmkhizer
Posts: 5
Joined: Thu Apr 21, 2016 4:40 pm

Re: Raspberry Pi - Data logging

Tue Apr 26, 2016 5:08 pm

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?

User avatar
davidcoton
Posts: 4141
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: Raspberry Pi - Data logging

Tue Apr 26, 2016 5:13 pm

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.
Signature retired

User avatar
liudr
Posts: 685
Joined: Sat Jun 01, 2013 12:11 am
Location: Central MN, USA
Contact: Website

Re: Raspberry Pi - Data logging

Tue Apr 26, 2016 6:38 pm

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?
Arduino data loggers, user interface, printed circuit board designer since 2009, RPI 3B 2B 2B Zero Jessie, assembly/C/C++/java/python programmer since the 80's

Return to “General discussion”