Go Down

Topic: MATLAB Serial Communication delay, Ultrasonic Sensor (Read 86 times) previous topic - next topic

Nov 30, 2014, 03:21 am Last Edit: Nov 30, 2014, 03:22 am by Darkbound
Hello guys, I am doing a small project, taking readings with MATLAB from Arduino and plotting them in realtime. The problem that I have is that after my code runs for 30-60 seconds I start to have huuuuuuuuge delays, the longer the code runs the longer the delays get, while if I look at the readings in the Arduino Serial Monitor there are no delays there at all. Like I said the longer the code runs the longer delays I get, it gets to a point where it registers an event that happened 5-6-7 seconds after it happened and I don't understand what is causing this.

Here are my codes:

MATLAB Code - http://pastebin.com/WNjAEwhU
Arduino Code - http://pastebin.com/wPuzUiuw

PaulS

I don't do rubbish bin. There is a mechanism to attach code to your post (using the Additional Options link). So, using rubbish bin isn't necessary.

If data goes to the serial monitor in a timely fashion, then the problem is not on the Arduino end, and you should be asking about the other code at the Ford dealer.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy