serial communication data shifted
2 views (last 30 days)
Show older comments
Hello I'm trying to read analog inputs from arduino and send them to matlab, My problem is that sometimes the data is shifted. I'm erading several analog inputs. When I plot the second input's data, I sometimes get the data from input 1, then I find input 2's data in the plot of input 3. There seem to be a synchronization issue, how can I fix it?
0 Comments
Answers (1)
Walter Roberson
on 26 Jan 2017
I suggest you debug this by sending the sensor number and the current sample count along with the sensor reading. This will allow you to see whether the data is all being transmitted but sometimes out of order, or if the problem is that entire chunks of data are being missed.
See Also
Categories
Find more on Data Acquisition Toolbox Supported 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!