Go Down

Topic: Reading streaming data from Arduino into Excel via VBA (Read 1 time) previous topic - next topic

jj56379

I am trying to read data streamed from a sensor into Excel via VBA using modCOMM (by David M. Hitchner).

The data from the sensor is streamed to the serial port by the Arduino with the Serial.print command and consists of a maximum of 7 ASCII string characters separated with a comma between each by using the Serial.print(",") command.

Currently, I can open the serial port and read the data into Excel. I've set-up a command button to read the data and display it in Excel and the data updates with each button click.

The problem is I don't know how to separate each data point so they are useful. Ideally, I would like to take a sample of readings (say 20) from the streaming serial data, average them and use it as a data point in the spreadsheet.

I'm guessing there must be a way to read and store the characters until a comma is read, add that value to a running total, and then get the next character set..etc. I'm also guessing there is a way to verify each data point is good (not corrupted in transmission).

Will someone here please point me in the right direction on this?

Any help is appreciated.

Jim

ieee488


sumguy

There is a thread in this section of the forum that specifically discusses saving data transmitted from the arduino to an Excel worksheet .

https://forum.arduino.cc/index.php?topic=437398.0

The software, which is available as a free download, is PLX-DAQ version 2. This software is user configurable in many ways and is maintained by NetDevil who designed the current version. The software comes with a user manual.

An alternative if you need to sample at a faster rate would be to depart from VBA and try a VSTO Excel add in

Go Up