How can I read in live data to MATLAB from Arduino

8 views (last 30 days)
I have a sketch written in Arduino to read in data from my circuit but I'm having trouble reading this data directly into MATLAB. I tried using the MATLAB Support Package for Arduino but it doesn't read the data in real time, it only reads it every 40 milliseconds and I need it to be every 10 milliseconds or less so I'll need a direct data feed. Does anyone have any ideas for a MATLAB script that will do this and possibly plot the data real time as it is coming in?

Accepted Answer

Walter Roberson
Walter Roberson on 29 May 2015
How exactly is the data being transferred? Is it being transferred by TCP/IP? Is it being transferred by an analog signal that your MATLAB session is running a data acquisition device on? Is it being transferred by a true RS232 serial port? Is it being transferred by a Virtual COM (Virtual serial port over USB) ? Is it being transferred by Zigbee?
If it is being transferred by a virtual serial port over USB then you are running into difficulties with the way that USB operates, and the problem might be difficult to fix.
  3 Comments
Walter Roberson
Walter Roberson on 29 May 2015
I need to verify the 40ms I mentioned there, but I need to look at something else at this time.

Sign in to comment.

More Answers (0)

Categories

Find more on Arduino Hardware in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!