Importing data from arduino while keeping it to work with it's running code

2 visualizzazioni (ultimi 30 giorni)
Dear all
I have an Arduino code which I use to communicate with an A/D (hx711) via a serial interface. I can plot the data using Arduino serial plotter but what I want is to import the data to MATLAB in real time and run more computations on it before plotting. I have downloaded Simulink and MATLAB support packages for Arduino but it seems that I need to write a new code in MATLAB and my previous codes in Arduino are useless. Is there any way to keep Arduino working with my previous code and import the data to MATLAB simultaneously? Thanks!

Risposta accettata

Ameer Hamza
Ameer Hamza il 31 Mag 2018
You are right, if you want to use Arduino support package for MATLAB or Simulink then you cannot use your Arduino sketches. You can go through several examples of using the support package here: https://www.mathworks.com/help/supportpkg/arduinoio/examples.html. Also, this video is also a useful tutorial to get statetd.
If you want to plot data in MATLAB in real-time then you may face some issues. You can refer to my answers to the following question to see how can you continually plot the data

Più risposte (0)

Categorie

Scopri di più su Arduino Hardware in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by