What is a data card?

What is the best way to write/read data on an SD card (Arduino Ethernet shield)?

  • I have an Arduino Uno board and an Ethernet shield with a micro sd card. I want to save some data on that card. "I wish I could find something similar to a database, but I know I'm stock in a file". What is the best type of files for that purpose (CSV, XML, JSON, plain text...)? Note: - The data as kind of arrays.. each row of data is a separate object. - I should be able to update that data "changing the status" after launching them to a web service. I would like to use JSON if there's any library for Arduino, because these data must be sent via HTTP to a web page. (Is it possible to create a database on the EEPROM and link it to some images in the SD card?)

  • Answer:

    CSV is easy to do and you can easily make graphs from it. It is widely used for Datalogging. Check out this tutorial

Sravan Neerugatti at Quora Visit the source

Was this solution helpful to you?

Other answers

The first is that strings take up a lot of memory and writing out XML tags uses a lot of strings.  You have to push them into program memory and nobody know's upto what possible chunk size it can take. As far as txt format is concerned It definitely makes sense to write data in 512-byte chunks, and using interrupts to log the data to 1 buffer while writing a 2nd buffer to SD is a good approach. Setting aside two 512-byte buffers uses up half of the UNO's 2kB of RAM. So it's doable, but leaving some room for stack space means you only have about 500-700 bytes of RAM left to play with. That might be enough, depending on your application. Also i would suggest Arduino VB Lab Arduino VB Lab is coded in VB.NET and allows users to make custom control interfaces for controlling the Arduino from the PC. Users can add gauges, buttons, images, etc, to an empty page and use the buttons to control something, or use the information being displayed. You are able to log all sensor data to an SQL Server database and select a date range on the graphs to view different time spans of data.

Pradumn Joshi

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.