Project update:
I used these code to examine the communication between Master-RS485 <--> RS485-Slave
Master
void setup(){
Serial.begin(9600);
pinMode(2,OUTPUT); //DE-RE
}
void loop(){
digitalWrite(2,HIGH) //Transmit mode
Serial.write("Hello World");
delay(10000);
}
Slave
void setup(){
Serial.begin(9600);
pinMode(2,OUTPUT); //DE-RE
}
void loop(){
digitalWrite(2,LOW) //Receive Mode
Serial.write(Serial.read());
delay(100);
}
And there no problem with the RS-485 communication, both end able to transmit and receive normally. My guess is there a problem with the library, however i'm no expert in that. Please help!