title: Arduino Serial.readBytes() Incompatible Types
body: <p>When I do this on Arduino:</p>
  
  <pre><code>const unsigned long baudrate = 57600;
  
  
  const int TledPin = 13;
  
  //---------------------------------------------------------------
  void setup() {
    //Serial.begin(baudrate);      // Identifies VCP module
    Serial2.begin(baudrate);      // Identifies UART2  SNAP module
    Serial3.begin(baudrate);      // Identifies UART3  RN42 modem
  
    pinMode(TledPin, OUTPUT);
    pinMode(SHDN_PWR, OUTPUT);      
  
  
    digitalWrite(SHDN_PWR, HIGH);     // Turn wireless board regulator ON
  
  } 
  //-----------------------------------------------------------------------
  
  void loop() {
      char rxdata[14];
     if (Serial2.available() &gt; 0){      // Read from SNAP write to RN42
                Serial2.readBytes(rxData, 14);
                Serial3.write(rxData);
                //Serial3.write(Serial2.read());
     }
  
  }   
  </code></pre>
  
  <p>I get the following errors:</p>
  
  <pre><code>BT_SNAP_SoftConnectV2.ino: In function 'void loop()':
  BT_SNAP_SoftConnectV2:47: error: 'rxData' was not declared in this scope
  BT_SNAP_SoftConnectV2:55: error: incompatible types in assignment of 'int' to 'char [14]'
  </code></pre>
  
  <p>In the Arduino documentation it says that Serial.readBytes(buffer, length) accepts a char[] and an int so I don't understand the error.</p>
  
  <p>Could somebody explain this please?</p>