xen956
Posts: 10
Joined: Wed Feb 04, 2015 12:27 pm

Logging any data into a file stored on the SD card

Thu Feb 05, 2015 8:33 am

Hello guys,

I own a Raspberry PI B+ and eventho I am a beginner with it, I am fluent with Matlab. You see where I am going to, yes I would like to record data that I get from the Raspberry PI from different sensors (the GY87 10 DoF sensor, GPS, etc).

However, I only found ways to get these data into a file on cloud, while I would like these information to be stored on the Raspberry. I don't really mind the format, but .TXT or .CSV-type files would be good.

How comes storing what the print function shows isn't as easy as using the print function?

Any help? :)

sdjf
Posts: 1395
Joined: Fri Mar 16, 2012 5:20 am
Location: California
Contact: Website

Re: Logging any data into a file stored on the SD card

Thu Feb 05, 2015 4:24 pm

I do NOT know Matlab, but googling around, I do see there seems to be a csvwrite command. In some languages, printing and saving to a file are different commands. That does not mean it has to be hard.

If you post specific code and error output from when you try to save the file direct to your Pi, then maybe someone who knows Matlab can help you.
FORUM TIP: To view someone's posting history, sign in, click on their user name, then on "Search User's Posts." || Running ArchLinuxArm on Model 2B and 512MB Model B

xen956
Posts: 10
Joined: Wed Feb 04, 2015 12:27 pm

Re: Logging any data into a file stored on the SD card

Fri Feb 06, 2015 7:11 am

Sorry I do not need help in Matlab, but with Python. I would like to know if there is a way to store variables that are called in a loop using the print command for example, in a file. :)


Return to “Beginners”