RS232 DATA READ THROUGH MAX232

I have a problem in reading data from MAX232, which is connected with green seeker sensor. Sensor provide output through 3 wire jack, which is finally connected to rs232 port then it goes to max232 to arduino. But when i am reading its data through software serial libraRy through serial command it display value which is not extactly match with my sensor value. Sensor have display also which show its value which is transmitted to arduino. But arduino output not match with sensor output. Plz anyone tell me the code in arduino for reading data through max232 or rs232.

Plz anyone tell me the code in arduino for reading data through max232 or rs232.

int rxChar = serialDeviceInstance.read ();

Show your code. Give examples of what you expect and of what you get.

i am using following code

#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11); // RX, TX

void setup()
{
// Open serial communications and wait for port to open:
Serial.begin(57600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
}

Serial.println("Goodnight moon!");

// set the data rate for the SoftwareSerial port
mySerial.begin(4800);

}

void loop() // run over and over
{
if (mySerial.available())
Serial.write(mySerial.read());

}

Result obtain through this code but not similar to that value which is send by sensor. Plz tell me the correction in my code.

Use code tags when posting code on the forum. See the sticky "how to use the forum".

Post examples of what you expect and what you get.

And a link to the datasheet / user manual of the sensor.

http://www.farmworks.com/files/pdf/GreenSeeker%20HCS/GreenSeekerQRC_91500-00-ENG_Screen.pdf

link for the datasheet of sensor. sterretje can you tell me the example code of any sensor which send data through rs232 and max232 and it is readable in arduino.

There is nothing special about RS232; your code looks correct.

Please post examples of what you expect and what you get.

@kum, do not cross-post. Do not hijack. Other thread removed.

@kum:

  1. You were asked to show your code using code tags -- you didn’t use code tags.

  2. You were twice asked to provide samples of the output you’re expecting and what you’re actually getting -- you didn’t do that at all.

  3. You were asked to provide a link to the datasheet of the device you’re using -- the document at the (non-clickable, text) link you provided doesn’t mention anything about RS232.

  4. You’re apparently cross-pointing to multiple threads.

My only conclusion is that you’re really not very interested in actually getting help.