0

Arduino Serial Plotter does not allow analysis or saving of data. What are the best serial data graphing software (preferably free, but i don't mind if it's paid as long as it's better than the bare-bones Arduino Serial Plotter)?

  1. It should work well with Arduino

  2. It should allow plotting several variables on the same graph

  3. Allow exporting data to CSV so i can show it in Excel.

  • you can print CSV to Serial Monitor or to SD card file and then process it – Juraj Jun 30 at 8:24
  • 1
    I tend to just save the serial data into a file: stty -F /dev/ttyACM0 raw 9600 && cat /dev/ttyACM0 > data.tsv, then graph it with gnuplot. But it's not real-time serial plotting, so I don't know if it could count as an answer... – Edgar Bonet Jun 30 at 8:29
  • you could write an app that does what you want using Processing .... processing.org ... there may be example programs that do what you want – jsotola Jun 30 at 23:03
2

Custom devices require custom solutions.

I suggest using Python (don't be scared).

This tutorial shows us how to read data from serial and save it to .csv file. You don't have to use a file. For example you can modify it to use an in memory list, and save just values from last 30 seconds. You can also read several values, and not just one.

import serial
import time
import csv

ser = serial.Serial('/dev/ttyACM0')
ser.flushInput()

while True:
    try:
        ser_bytes = ser.readline()
        decoded_bytes = float(ser_bytes[0:len(ser_bytes)-2].decode("utf-8"))
        print(decoded_bytes)
        with open("test_data.csv","a") as f:
            writer = csv.writer(f,delimiter=",")
            writer.writerow([time.time(),decoded_bytes])
    except:
        print("Keyboard Interrupt")
        break

This tutorial (and this one) shows you how very quickly to show a sophisticated plot of the data you collected. You can even make a plot that shows several graphs and updates in real time.

import matplotlib.pyplot as plt
plt.plot([1,2,3,4])
plt.ylabel('some numbers')
plt.show()

Don't be scared it's not black magic. It just takes few days to understand how things work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.