c - Arduino Serial.readBytes() Incompatible Types -


when on arduino:

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() > 0){      // read snap write rn42               serial2.readbytes(rxdata, 14);               serial3.write(rxdata);               //serial3.write(serial2.read());    }  }    

i following errors:

bt_snap_softconnectv2.ino: in function 'void loop()': bt_snap_softconnectv2:47: error: 'rxdata' not declared in scope bt_snap_softconnectv2:55: error: incompatible types in assignment of 'int' 'char [14]' 

in arduino documentation says serial.readbytes(buffer, length) accepts char[] , int don't understand error.

could explain please?

typo: rxdata not same rxdata (which declared array as).

for second error, you've not included code - sample, you've included line 52, error on 55.


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -