Serial monitor displaying extra bytes

Hey folks,

Thanks for your time to read and repond to this. I have an ultrasonic sensor which operates on RS485.

It works just fine with my Arduino but when I send commands to the ultrasonic sensor, it displays on the Serial Monitor as ascii rubbish. "Uª Uª " to be exact.
This is ascii which corresponds to the data packets I am sending. Maybe sending data through the RS485 port is being repeated up the USB cable to the PC.

When the ultrasonic sensor reponds and says "OK" and sends back it's reading, it says something like: "55 aa 11 02 02 01 0A 11" where the second last byte "OA" is the distance in centimeters.

This displays just fine on Arduino's serial monitor, but is not accompanied by any extra ascii rubbish.

So why is it just when I'm sending information via RS485 that extra rubbish is displayed in the Serial Monitor but when I'm receiving data via RS485 it displays completely clean in the Serial Monitor?


You could give us a clue of what you're sending.
(Hint: post your code)

and says "OK" and sends back it's reading

Is there a misplaced apostrophe there, or are you saying that the sensor is giving some sort of status message that it is (it's) reading?

I'm honestly confused with your question.

I seem to see what is going on, but I'm not sure about how you set up your Arduino... just to be clear, where did you connect your RS-485 driver? To the RX TX pins that the USB uses?
And please, put the code here and explain with a bit more clarity what happens in what exact order. :wink: