I am using the RS232 to ttl converter.
Using Arduino Uno: SoftwareSerial
byte input[] = {0x3F,0x23,0x7E,0x34,0x41,0x7E,0x32,0x59,0x31,0x35,0x30,0x30,0x23,0x3F};
Serial1.write(input, sizeof(input));
I did not receive any dummy data from an inverter.
Using Arduino Mega 2560 :
byte input1[] = {0x3F,0x23,0x7E,0x34,0x41,0x7E,0x32,0x59,0x31,0x35,0x30,0x30,0x23,0x3F};
Serial1.write(input1, sizeof(input1));
(Note: I passed each Hex separately).
Receive Dummy Data from Arduino. Then I pass :
byte input1[] = {0x3F,0x23,0x7E,0x34,0x42,0x7E,0x23,0x3F};
Serial1.write(input1, sizeof(input1));
if (Serial1.available() > 0)
{
for(int n=0; n<100; n++)
{
buf[n] = Serial1.read();
Serial.println(buf[n],HEX);
}
}
I receive a few chunks (ie. 3-4 bytes and the FFFFF) data, not coming whole data.
Output Data : 2341FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
Baud Rate: 9600, config Default
What is the issue?
Using RS232 to USB: I was able to read data from python script.