Read .CSV file

Arduino/programming noob here. My goal is to read an excel file and store the values on eeprom. From my research I learned I can't read an .xls file and need to save it as an .CSV text file. How do you suggest I go about doing this?

(assuming you mean the eeprom of the Arduino itself) There are several ways, the trivial way is : you can have a small PC program send the values over serial and let the arduino read them and write them in EEPROM

A more interesting way might be using an SD-card to store the csv file and read it under Arduino control. Something in me says that you want to change this CSV file every once and a while and replacing an SD card is far easier than doing (1) over and over again.

And lets not forget you can store far more values on the SD-card than in EEPROM.

so give the SD option some thoughts.

If you want to store the values on an external EEPROM (I2C or SPI) you should go the trivial way. On the Arduino playground there are examples how to write to EEPROM.

Can you give some more details of what you're trying to achieve?

Can you give some more details of what you’re trying to achieve?

I am programming a car’s throttle body to be used in a forced induction application. A sensor will send an analog signal to the arduino board relating to the car’s RPM. My idea is to have a data structure of throttle positions corresponding to RPM. The table needs to be easily adjustable so it can be modified during testing. I was thinking EEPROM because there will not be a computer onboard.

Well obviously, if you want to keep the throttle position in Excel, you're going to need a computer involved somewhere when you adjust it, in which case I'd just store the data in the sketch itself in progmem.

The SD card idea is nice - you could even have the arduino look for a file on the card, compare the csv data to what it has in EEPROM and adjust it accordingly - still needs a computer to write the file though.

Alternatively, you could setup the EEPROM once, load a new program and hook up an LCD and some buttons to the arduino. The new program would run the throttle control app, but also have a menu that would let you increment/decrement the settings in EEPROM. I think Rugged circuits (posts here often) has a suitable shield. This would make the system stand alone. It would be a bit labour intensive to change a lot of the settings though.

How many values are in the csv, and what is their datatype?

There's a hardware solution that solves the CSV problem for you, and I recently got it working. It comes from a book by Jon Oxer called "Practical Arduino" which you can read about here in the "Vehicle Telemetry" section.

Basically it uses a removable USB memory stick that plugs into a Viniculum VDIP1 from that creates the CSV file for you, then after logging you plug the memory stick into your computer and open the resulting CSV in Excel. I think the VDIP1 may have been superceded by a later module (VDIP2?)

The "Vehicle Telemetry" idea is very interesting as it logs lots of parameters relating to car performance.

RacingMarqueSystems: My idea is to have a data structure of throttle positions corresponding to RPM.

Could you clarify that?

If you mean that you intend to have a two-dimensional map indexed by throttle position and RPM ("alpha-N" in engine management speak) then what are you going to do with the map, and how frequently?

RacingMarqueSystems: My idea is to have a data structure of throttle positions corresponding to RPM.

this only requires logging of time, throttle and rpm, every 100ms (say). Then plot throttle against rpm.

this shield would do half the work - -

robtillaart: this shield would do half the work -

that link is dead

Extra character on end. Should be:

link works now, thanks.

that logger shield looks neat, have you used it successfully ?

fixed the link - thanks PaulS,

Yes I have used the shield in a few projects - some tests running for a few minutes - other for weeks and months

Syncing the RTC with - - needs an ethernetshield BTW

If you have to write a lot of small chunks to the SD card (e.g 10 times/sec) , you better collect the data in RAM until you have 512 bytes to have far less overhead. It is also good to have records which size is a power of 2 so they fit neatly in a "sector"