I get the data from a sensor which is in RS485. I am using RS485-RS232 Converter. Then its given to uart usb converter and I get the data in TTL. I am able to receive the data in uart (hyperterminal). I have connected the TX, RX, GND pins to 10, 11, GND pins of Arduino UNO. I want to communicate it with Arduino UNO through SoftSerial and here is the code
#include <SoftwareSerial.h>
#define rxPin 10
#define txPin 11
SoftwareSerial mySerial = SoftwareSerial(rxPin, txPin);
void setup() {
pinMode(rxPin, INPUT);
pinMode(txPin, OUTPUT);
mySerial.begin(9600);
Serial.begin(9600);
}
void loop()
{
while (mySerial.available() > 0) {
Serial.println("Data is available");
Serial.println(mySerial.read());
}
}
But I'm not able to see the data on serial monitor.
After converting it to RS232, its given to uart converter where i get data in TTL
- please edit your post to show your wiring. – Nick Gammon Aug 7 at 9:42