Go Down

Topic: save data from Arduino in CSV file, Processing (Read 5310 times) previous topic - next topic

vicas

Dear , I am new here and arduino I need save data from Arduino to csv. file. How I make csv file from code below

int sensorPin = A0;    // analog input pin to hook the sensor to
int sensorValue = 0;  // variable to store the value coming from the sensor
float val=0.0;
void setup() {
  Serial.begin(9600); // initialize serial communications
}
 
void loop() {
    sensorValue = analogRead(sensorPin) ;
    val=sensorValue*(5/1023);
  Serial.println(val);
  delay(10);
}

that is simple code for measure voltage from analog input. How I can make csv in Processing? Thanks

PaulS

Quote
How I make csv file from code below
You don't. The Arduino has no place to store a file, regardless of what format the data is in, or what extension you want to use.

Quote
How I can make csv in Processing?
Processing comes with lots of examples, just like the Arduino IDE. Processing comes with a forum, too, just like here.

They don't much like Arduino questions there. We don't much like Processing questions here, either, unless they are specifically about how to get data to or from Processing.
The art of getting good answers lies in asking good questions.

vicas

How I can save data from arduino code in csv file on example Excel?

PaulS

How I can save data from arduino code in csv file on example Excel?

Using Processing? Did you not understand that that is a Processing question, for the Processing forum?

Did you not understand that the Processing folks provided you with examples that read from and write to files. Did you even look at any of them?
The art of getting good answers lies in asking good questions.

f41_ardu

Dear , I am new here and arduino I need save data from Arduino to csv. file. How I make csv file from code below

int sensorPin = A0;    // analog input pin to hook the sensor to
int sensorValue = 0;  // variable to store the value coming from the sensor
float val=0.0;
void setup() {
  Serial.begin(9600); // initialize serial communications
}
 
void loop() {
    sensorValue = analogRead(sensorPin) ;
    val=sensorValue*(5/1023);
  Serial.println(val);
  delay(10);
}

that is simple code for measure voltage from analog input. How I can make csv in Processing? Thanks
Hi,

look i.e. at this link https://forum.processing.org/two/discussion/879/saving-arduino-data-with-processing

This may help you.


f41_ardu

NetDevil

Hi vicas,

the tool PLX DAQ runs in Excel and captures all information from the serial port and lists it in a worksheet.
This worksheet can afterwards be saves as a CSV or you can create graphs etc there directly.

PLX DAQ can be found for example here: http://forum.arduino.cc/index.php?topic=437398.0

A tutorial for PLX DAQ (which is really really easy to use) can be found here (http://robottini.altervista.org/arduino-and-real-time-charts-in-excel) or many times on Youtube.

Good luck

JSchiltz19

A super simple way to record data is by using these Processing and Arduino Programs.

They send data using markers to tell Processing when the transmission is starting and ending and are quite easy to use.

Go Up