Go Down

Topic: Excel sheet With arduino UNO (Read 5854 times) previous topic - next topic

MostafaHamdy

Can i save data from arduino board as Excel sheet or used  SD card to save data then put this SD card into computer to read data as Excel sheet

spycatcher2k

Drew.
http://www.uk-pcb.co.uk - My UK Based PCB Fab & Assembly Company
Design work undertaken
SMD & Thru-Hole assembly

el_supremo

You can write the data to a file on the SD as a Comma-Separated Values file. A CSV file can be read directly by Excel.

Pete

MostafaHamdy


You can write the data to a file on the SD as a Comma-Separated Values file. A CSV file can be read directly by Excel.

Pete

can yo help me with some details because i don't dealing with this before  :)

PeterH


can yo help me with some details because i don't dealing with this before  :)


Which part are you having trouble with?

Do you have an SD card?
Can you write a text file to it?
Can you google "comma separated variable"?
I only provide help via the forum - please do not contact me for private consultancy.

MostafaHamdy


Which part are you having trouble with?

Do you have an SD card?
Can you write a text file to it?
Can you google "comma separated variable"?


write text file to  SD card

el_supremo

I haven't been able to test this code but it does at least compile. It should create the file test.csv on an SD card, write three lines of data to the file and then close it. If it works, you can then just put the SD card in a PC and double-click on the file which should open the file in Excel.

Pete

Code: [Select]

#include <SD.h>
File myFile;
void setup()
{
  Serial.begin(9600);
  myFile = SD.open("test.csv", O_APPEND | O_WRITE);
  if(myFile) {
    myFile.println("1,2,3");
    myFile.println("101,322,8293");
    myFile.println("7012,3964,281");
    myFile.close();
  } else {
    Serial.println("Can't open test.csv on the SD card");
  }
}

void loop(void){}

MostafaHamdy


I haven't been able to test this code but it does at least compile. It should create the file test.csv on an SD card, write three lines of data to the file and then close it. If it works, you can then just put the SD card in a PC and double-click on the file which should open the file in Excel.

Pete

i will try it  ;)

MostafaHamdy

can i use Breakout Board for microSD Transflash (https://www.sparkfun.com/products/544) to read and write on micro SD , i don't know if i need to add some component to be suitable to use it with SD Library in arduino-UNO and which pin i will connect to use it as SD card Shield

MostafaHamdy

how i connect Breakout Board for microSD Transflash  (https://www.sparkfun.com/products/544)
with arduino uno

el_supremo

That one is not directly compatible with UNO because the UNO uses 5V and micro-SD cards use 3.3V. You would have to do a level conversion to make them compatible.
I use the Adafruit board which is a bit more expensive but handles the conversion.
https://www.adafruit.com/products/254

They are easy to wire up. They will use pins 10,11,12 and 13 on the UNO. And note that the SPI hardware requires Pin 13 which means it can't be used for the LED indicator.

Pete

MostafaHamdy


That one is not directly compatible with UNO because the UNO uses 5V and micro-SD cards use 3.3V. You would have to do a level conversion to make them compatible.
I use the Adafruit board which is a bit more expensive but handles the conversion.
https://www.adafruit.com/products/254

They are easy to wire up. They will use pins 10,11,12 and 13 on the UNO. And note that the SPI hardware requires Pin 13 which means it can't be used for the LED indicator.

Pete


i try to find it in electronic stores in my country  but i can't get it  and it will take long time for shipping so can i add component or any thing to  Breakout Board for microSD Transflash to make it compatible with UNO board
Thanks for answer  :)

ahref

These:
https://www.sparkfun.com/products/8745

will probably be what you need to use the board you have.

You seriously are better off using https://www.sparkfun.com/products/9802 though.

I use it extensively to log to a multiple csv files.

MostafaHamdy

finally i used Breakout Board for microSD Transflash i connect
pin 13 to SCK
pin 12 to Do
pin 11 to DI
pin 4 to CS
CD is not connected
and it work good but i want to know is it safe method ?

retrolefty


These:
https://www.sparkfun.com/products/8745

will probably be what you need to use the board you have.

You seriously are better off using https://www.sparkfun.com/products/9802 though.

I use it extensively to log to a multiple csv files.


And for just $5 more a microSC + real time clock shield which is almost always a need anyway for data logging.

http://www.adafruit.com/products/1141

Lefty

Go Up