title: Receive data via Arduino Mega R32060 from MAX485 or USB TTL convertor
body: <p>I am trying to receive something MAX485 or USB TTL convertor with this code for Arduino Mega R32060.</p>
  <pre><code>#include &lt;SoftwareSerial.h&gt;
  
  #define SSerialRX        15
  #define SSerialTX        14 
  #define SSerialTxControl 3  
  
  #define RS485Transmit    HIGH
  #define RS485Receive     LOW
  
  #define Pin13LED         13
  
  SoftwareSerial RS485Serial(SSerialRX, SSerialTX);
  
  int byteReceived;
  int byteSend;
  
  void setup()
  {
    Serial.begin(9600);
  
    pinMode(Pin13LED, OUTPUT);
    pinMode(SSerialTxControl, OUTPUT);
  
    digitalWrite(SSerialTxControl, RS485Receive); 
  
    RS485Serial.begin(9600); 
  }
  
  void loop()
  {  
    if (Serial.available())
    {
      digitalWrite(Pin13LED, HIGH);
      byteReceived = Serial.read();
      Serial.println(byteReceived);
  
      digitalWrite(SSerialTxControl, RS485Transmit);  
      RS485Serial.write(byteReceived);
  
      delay(10);
      digitalWrite(Pin13LED, LOW);
      digitalWrite(SSerialTxControl, RS485Receive); 
    }
  
    if (RS485Serial.available())  //Look for data from other Arduino
    {
      digitalWrite(Pin13LED, HIGH);  // Show activity
      byteReceived = RS485Serial.read();    // Read received byte
      Serial.write(byteReceived);        // Show on Serial Monitor
      
      delay(10);
      digitalWrite(Pin13LED, LOW);  // Show activity 
      Serial.println(byteReceived);
    }
  }
  </code></pre>
  <p>Pin 3 here is a switch for transmission and reseption modes for MAX485.</p>
  <p>I can send data <strong>from</strong> arduino perfectely however.</p>
  <p>But condition <code>RS485Serial.available()</code> never becomes true. What can be a reason for that?</p>