Arduino to Excel

Hey there!

I am trying to send serial data from 6 of my potentiometers attached to a robot arm. I know how to log data into the excel spreadsheet but I am trying to achieve two things here.

  1. To reduce redundancy, I would like to store the value from the potentiometer and also the time duration for which it remained at that value and only make a new entry if there is a change in value. This way, a lot of rows can be saved. Say, the sampling is done 10 times every second and the potentiometer remains at a particular value for 4 seconds, 40 rows can be substituted with 1 row. This looks like an idea realizable but I just can't figure out how.

  2. I have built a stick model of my robot arm in the excel using scatter plot. I would like to update the value of 6 particular cells in real time from the values read from the 6 potentiometers, to replicate the arm's position in excel.

Any help will be greatly appreciated! Thanks!

Do not cross-post. Other topic deleted.

Sure! Sorry about that.

  1. To reduce redundancy, I would like to store the value from the potentiometer and also the time duration for which it remained at that value and only make a new entry if there is a change in value. This way, a lot of rows can be saved. Say, the sampling is done 10 times every second and the potentiometer remains at a particular value for 4 seconds, 40 rows can be substituted with 1 row. This looks like an idea realizable but I just can't figure out how.

You need to hold the last value and a counter an compare it to the new value. If the same you increase the counter,
if different, send the counter + value to PC. Not really difficult however,
However in Excel you typically want one column/row of measurements with same time stamp.
That means if one of the six differ you need to write all values.
Given there is noise on the lines (which can be cancelled) it is very unlikely that all 6 will be equal.

So my advice is to do not use compression in Excel, but average samples in the Arduino and send that average to Excel
(1 or 2 averages per second per potmeter)

If you get that working, you can see if compression makes sense

You have to consider the adc readings are noisy. With good filtering and wiring +/-2 bits with arduino.
Another approach would be to introduce a "hysteresis" - ie 5 or 10 - so you will log your data only when there is a change bigger by the hysteresis value against the previous measurement..