Go Down

Topic: datalog - gps - sdcard (Read 537 times) previous topic - next topic

PaulS

Quote
- Know what it is data

Good thing that one of use knows.

Quote
- I have the sd card and ok because I tested with another test pde

Excellent.

Quote
- I do not know how to take this data and write to the card, I do not plan well.

Sorry I can't help you. I have no idea what you want to write to the file on the SD card. Planning well and explaining well are two different things.

NickPyner

#6
Nov 12, 2012, 12:18 am Last Edit: Nov 12, 2012, 12:33 am by NickPyner Reason: 1
Every datalogging to SD card sketch I have seen has two things

1. The SD card library in the inclusions list
2. Commands for initialisation of the SD card in the setup section.

Yours apparently has neither. There is a faint possibility that the SD stuff is in your SoftwareSerial library, but it looks like the reason why you can't write to the SD is because you have made no provision in your sketch to do so. There is a datalogging sketch in the SD section of the Arduino examples which reveals all. You may find you can simply plug your GPS stuff into that.

Essentially it is just a case of having

open file
fileName.print(data)
close file

in your loop. I imagine the stuff you want on the SD is the same as the stuff you print on the serial monitor, so you already have that worked out and you write to the SD in the same way.

Note that the Arduino doesn't datestamp anything and you might need to include a clock. You can use that to name the file as well as supply data.


sergiotux

I found this and it's working.
I'll just change the data

thank you very much

http://arduino.cc/forum/index.php/topic,128847.0.html

Go Up