serial communication data shifted
Mostra commenti meno recenti
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?
Risposte (1)
Walter Roberson
il 26 Gen 2017
1 voto
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.
Categorie
Scopri di più su Instrument Control Toolbox in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!