Sending serial data to sensor

I want to send char 's' to sensor. I used simple code

void setup() {

void loop() {

when I check it with serial monitor, I get character 's'.

But I used same serial line, connected serial to usb cable...

That gives "Fy="

Anyone has idea about this ?

It might be basic question, sorry... I tried in internet to find solution, nothing helps...

If someone helps to send this data, that would be really helpful.

Thank you


Sorry, I posted in wrong group.. I dont know how to delete my post..

Can you help with solution ?

I will delete the duplicate and move this one

What sort of sensor is it and why do you want to write to it ?

If the sensor is connected to pins 0 and 1 then you will have problems because they are used by the Serial monitor

More details of your project please

Wrong baud rate selected, or baud rate too fast for the length of line/wiring.

When people mention "Serial to USB" cable it always has me wondering...
Is it a TTL or RS-232 level output?

Are you perhaps connecting RS-232 level signals (+/-15v) directly to the Arduino's serial input pins (5v or 3.3v level signals).

Thank you pcbbc you are right

I found the problem, UART ttl in arduino has (5v or 3.3v level signals)... RS-232 has (+/-15v)...

So I need to use RS232 - TTL converter like MAX232.

Thanks everyone