Gibberish values from Arduino UNO serial monitor

When I try to run my serial monitor for wind speed and wind direction data, it gives gibberish values - I was trying to get MATLAB to read these values, but everything basically started going wrong as soon as I attached the arduino to a specific port using the special MATLAB installation support. The attached pics show the problem! Anyone have any ideas at all, as I honestly can't understand how to make MATLAB read the data as normal numbers?

error.pdf (179 KB)

are you trying to open the Serial console and connect to Matlab from the same Serial port ?

I think so? I did just attach everything from COM3, is that the wrong thing to do?

you can't have two software attached to the same port.

Sorry, I'm a bit new to this software, but if the UNO is attached to COM3, surely MATLAB needs to get the values from COM3 since that's where the data is being read?
How would I fix this as well if this is the issue?

Yes you need to open Matlab to COM3, but you should not try to open the Serial monitor from the IDE at the same time.

if what you see when not attaching Matlab looks like your second picture, then that's what Matlab gets (it's ASCII text).

I see, so even if it looks that way, it doesn't mean the data is wrong, just that I shouldn't be opening it through arduino now that it's connected to MATLAB as well?
Even if so, I'm not quite sure how the data is being interpreted, because the MATLAB is interpreting the values as 1 set (I got the code from arduino serial data acquisition downloads), so is the data going through as in the 150 range because it's, let's say, using a direction of 110 and a speed of 30 and adding them? Pic attached below
Obviously would like to change this, so any ideas you have would be great :slight_smile:

Doc1.pdf (230 KB)

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.